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 » CExtResizableDialog refresh problem Collapse All
Subject Author Date
Offer Har Jan 4, 2007 - 7:59 AM

Dear Support,

I have a dialog that contains several controls.
I have a button in the control that when press hides/shows some of the dialog’s control (acts like a collapse/un-collapse button):
* The button hides some of the dialog’s content, and moves the rest of the controls up.
* The next press, it shows back all the hidden controls, and moves the rest of the controls down.

When doing it using Prof-UIS, using CExtResizableDialog, and setting the dialog’s attributes accordingly (clipping etc.) I see ’leftovers’ after I move the controls (I move them using ::SetWindowPos or ::DeferWindowPos - same result), and the the dialog only re-paints itself correctly when I ’force’ it to redraw itself (resize it, or draw another window over it).

The same code, when deriving from CDialog works fine.

I could not find a way to force the dialog to repaint itself and get rid of this remains of the controls. RedarwWindow() or Invalidate() on the dialog did nothing.

What am I missing? How can I force the CExtResizableDialog to redraw itself?

Thanks,
Ron.

Offer Har Jan 5, 2007 - 6:58 AM

I am not using group-box.
Also, i am emphasizing that when the clip properties are off there is no problem (but it flickers...) so it seems to me that the class CExtResizableDialog does not do a good job of monitoring when the controls are used using SetWindowPos or BeginDeferWindowPos calls.

That’s what i would like to know what call to make so that the CExtResizableDialog will refresh completly all its content.

Thanks.

Offer Har Jan 4, 2007 - 9:32 AM

Dear Support,

I explored this bug further more, and the cause of the problem is the clip children and clip siblings.
When they are false (default CDialog) the CExtResizableDialog paints itself correctly HOWEVER, it flickers like crazy.
When they are true, there is no flicker, but a lot of garbage is displayed on the dialog.

Can you please send me what command i need to call to redraw the dialog so this garbage will be lost?

Thanks.

Technical Support Jan 5, 2007 - 6:50 AM

The problem may be that you are using a group box on the dialog and the tab order for the controls inside the group box isn’t correct . You can read more about this in the following FAQ article:

I use CExtGroupBox and a set of controls. Some controls are not painted correctly, what may be wrong?



Offer Har Jan 5, 2007 - 6:59 AM

I am not using group-box.

Also, I am emphasizing that when the clip properties are off there is no problem (but it flickers...) so it seems to me that the class CExtResizableDialog does not do a good job of monitoring when the controls are used using SetWindowPos or BeginDeferWindowPos calls.

That’s what i would like to know what call to make so that the CExtResizableDialog will refresh completly all its content.

Thanks.

Technical Support Jan 5, 2007 - 9:10 AM

We tried to reproduce this issue but failed. The dialog background is always painted correctly. Would you send us a test project that demonstrates the problem?

In any case, the Invalidate() method should cause the dialog background to be repainted. You could also try the RedrawWindow() method with the RDW_ALLCHILDREN flag in order to repaint the dialog with all its child windows:

RedrawWindow(
    NULL, 
    NULL,
    RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW
        | RDW_ALLCHILDREN | RDW_FRAME
    );

Offer Har Jan 5, 2007 - 9:21 AM

I guess that this was the problem... the childer are not repalinted by default.

Please note that the Invalidate did not work, only RedrawWindow with RDW_ALLCHILDREN flag, which is not in the defaulty of the RedrawWindow function.