Professional UI Solutions
Site Map   /  Register


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 » CExtColorButton Drawing Problems Collapse All
Subject Author Date
Kevin Murray May 23, 2013 - 11:33 AM

We have found that on a standard dialog (meaning, just CDialog or CFormView or similar, not one of the CExt...Dialog classes), if we place a CExtColorButton within a group box, the button will not draw itself by default. If you click the mouse in the area where the button resides, it will draw itself in the open state, with the drop down palette visible. As soon as an action is performed to close the button (click a color, click elsewhere off the button), it no longer draws itself until you once again click on the button’s area of the screen.

We have tried using CExtGroupBox’s hoping that was it, to no avail. We have tried modifying the dialog styles, to no avail. The only thing that does seem to work is to modify the button’s style after the sublcassing has happened:

m_ColorButton.ModifyStyle( WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0 );

We tracked this down to the those styles being added in the PreSubclassWindow method of the button class. Now, we aren’t sure why this causes a problem, or even if the removal of those styles is the most appropriate fix. We are hoping you can provide insight into this...


Kevin Murray

Art Wilkes Jun 11, 2013 - 9:58 AM

One of the quirks of the Prof-UIS MFC Library is that the group boxes need to be at the end of the dialog boxes. This has to due with the Z order of the windows. We use the edit as c++ and take the group box entries in the rc file and put them at the end of the dialog box.