|
-
April 26th, 2007, 04:09 PM
#1
question about sizing views?
Hello,
My question is about resizing a child window of a multi document /view application.
If the view displays a big Bitmap and I try to resize it by dragging it with the mouse, the latter is very slow and shows border effects.
So my idea is for example to mouse click on one of the side of the window and while I move the mouse, the window does not resize.
Actually it will resize just after I release the mouse button. The new position will be where I released the mouse. Please note that it is just an idea and any suggestion is very welcome.
I tried to find some articles before posting my question here but I was not successful.
Please could you recommend me a solution or articles explaining how to solve this problem?
I have no specific code to show. I just visited the functions OnCreate, OnInitialUpdate,Onsize, OnDraw and OnEraseBkgnd (this last fct is to avoid flickering).
Many thanks for your answers.
-
April 27th, 2007, 02:03 AM
#2
Re: question about sizing views?
The location where you have your bitmap drawing code is very important. You should have this code in the OnDraw(), not in OnSize(). To speed things up you can use the memory device context trick. Create a memory device context, then draw your bitmap onto this and then place the memory context on screen.
Time is fun when you're having flies 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|