Question about resizing 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.
-
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.
I'd say you need to implement some kind of clipping so you're not drawing the whole bitmap each time, just the portion which is visible. How are you displaying your bitmap? BitBlt?
- S 50 cups of coffee and you know it's on!