Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Resizing flickers Collapse All
Subject Author Date
Offer Har Oct 26, 2007 - 9:02 AM

Dear Support,

I have a resizable dialog with several anchors.

When dragging the top border some controls inside the dialog flicker - it seems that they are first drawn in the original location, and then moved to the anchor base computer location. The flickering controls are those that are anchored to the bottom of the dialog

When dragging the other 3 borders this flicker is not displayed.

Please explain how to solve this problem.

Regards,
Ron.

Technical Support Oct 26, 2007 - 1:15 PM

We agree with you but we should notice the same effect can be seen while resizing via dragging other borders. In fact, this "flicker" effect is present in any window on your desktop, but if painting algorithms are simplest as possible, then you don’t see this effect even on slow machines. It looks like Windows OS displays the "previous" content of the window first and then lets the window to paint itself. In the simplest case we have a popup window on the desktop running on a slow computer, there are no child windows inside this window, it eats up the WM_ERASEBKGND message and paints its content through a memory-based HDC when handling the WM_PAINT message. Even in this case it’s possible to see flickering you are talking about when running such a simple application on VMWare/VirtualPC. It is Interesting that other OSes (Mac OS X, Linux) also produce the same effect.

Offer Har Oct 27, 2007 - 8:36 AM

I’m sorry, but I have to disagree with you...
There is a distinct difference when dragging to top or left frame vs. the right or bottom frame, and it is only noticeable when anchoring controls to the right or bottom frame (100 in the CSize of LT for example)
In this specific case the flickering is highly noticeable, and It is visible that you move the control after windows already redraw it.
I know that you suppress redraw using LockWindowUpdate can’t you override the OnSize or even earlier and stop windows from drawing the window prior to moving the controls?