Thread View: borland.public.cppbuilder.nativeapi
1 messages
1 total messages
Started by Clayton Arends
Mon, 28 Apr 2003 19:09
Turn off scrolling of device context on resize?
Author: Clayton Arends
Date: Mon, 28 Apr 2003 19:09
Date: Mon, 28 Apr 2003 19:09
35 lines
2758 bytes
2758 bytes
All, I hope someone can be of some assistance. I have scoured Google with every combination of this topic without finding any clues. Please follow my thoughts through to completion before attempting to post since I'm not even very clear in my own mind what is exactly happening. I would like to instruct Windows (or the VCL ... not sure which) to not scroll the canvas of a window when a resize event occurs. Here is the scenario. I have a panel which draws an image beneath all child controls that is located at the bottom right of the panel. When the user resizes the panel (using a splitter to the left of the panel) the image is first scrolled to the left (due to internal Windows or VCL logic) and then the panel is invalidated and repainted which my panel then paints the image back in the appropriate location. While this doesn't appear to be too much of a problem it causes an annoying distortion for a fraction of a second that any user can visually pick up on. DoubleBuffered and FullRepaint properties have no affect. I have also tried using WM_SETREDRAW to no avail. To see this for yourself create an application and place a panel aligned left, a splitter aligned left (ResizeStyle set to rsUpdate), and a TImage aligned client (Stretch set to true). Put a rather large graphic in TImage so the affect can be easily seen. Move the splitter rapidly and watch the graphic push/scroll and then redraw itself correctly. Or, alternatively, if you use Windows Messenger you can see the same effect of its lower right aligned graphic by rapidly resizing the form from the left. To sum up, I would like to instruct Windows to not scroll a window's device context on a resize. I would prefer that garbage pixels be left behind until the subsequent paint operation can be performed. TIA, - Clayton
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads