Article View: borland.public.cppbuilder.nativeapi
Article #16766Turn off scrolling of device context on resize?
From: 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
Technical Details
Message-ID:
<3ead7c6e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b09f8f24ef00b72b,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-28 12:12:55 PST From: "Clayton Arends" <claytonarends@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Turn off scrolling of device context on resize? Date: Mon, 28 Apr 2003 12:09:46 -0700 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 24.30.133.15 Message-ID: <3ead7c6e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1051556974 24.30.133.15 (28 Apr 2003 12:09:34 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail