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 » Edit control flickers Collapse All
Subject Author Date
Offer Har Mar 28, 2008 - 9:37 AM

Dear Support,


I have an edit control in a CExtResizableDialog dialog with these properties:



When the dialog is resized, the text in the control flickers heavily. The dialog have the clip attributes set, so this is not the problem.


I am using the CExtPaintManagerOffice2007_Black paint manager.


Any ideas?


Ron.

Technical Support Apr 8, 2008 - 12:15 PM

Yes we reproduced it. Thank you for reporting this. But it seems this is the case when the windows of common controls library are handled in a special way. We are still looking for a solution to this problem

Offer Har Apr 8, 2008 - 12:18 PM

What do you mean by a ’special way’?

Technical Support Apr 8, 2008 - 12:51 PM

Here is a scenario. You decide to implement a CButton-derived class (or a CWnd-derived class) in which you have a WM_PAINT message handler. You create a dialog with several buttons and subclass some or all of them with your button class which implements custom painting of the button’s window surface. You run this test application and try to traverse the buttons with the TAB key, focus them with mouse clicks, switch from the dialog window to some other application and back. In most cases and enough often, you will see the default looking button windows instead of those painted with your code. It’s not possible to repaint buttons only by handling the WM_PAINT message because it’s not invoked in all cases. This is what we call a "special" way. The same special things occur with other common controls. In the case of buttons, we created the CExtButton class and several classes derived from it (like a radio, check and hyperlink) and in all of them a custom drawn button type is used and appropriate behavior is implemented. For instance, in the case of our push buttons which are in fact custom drawn buttons, we had to handle mouse and keyboard events for emulating the push button behavior. Very fortunately the custom drawn buttons are never become painted by default and not through the WM_PAINT message. We have no such chances in the case of combo box common control. We can create some window inside the combo box to hide these bad painting problems, but this does not look like a good solution.

Technical Support Mar 31, 2008 - 12:02 PM

The WS_CLIPCHILDRE|WS_CLIPSIBLINS styles applied to a dialog window is the first condition for implementing a flicker-free dialog window. The second one is a z-order adjustment: please ensure that the z-order of windows like group boxes and static frames is larger than z-orders of other dialog controls.

Offer Har Mar 31, 2008 - 12:12 PM

Shouldn’t the SubclassChildControls be enough for group boxes? I add it in all OnInitDialog functions.


I don’t have any group boxes or static controls in the dialog.


Please note that this is a multi-line edit control. If I remove the multi-line there is no flicker at all.


I’m sure you can reporduce it easily.

Offer Har Apr 8, 2008 - 9:29 AM

Dear Support,


Where you able to reproduce this flicker problem? It should not be too complicated.


Regards,


Ron.