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 General Discussion » How to make a class dereced from CExtResizableDialog class has the same theme style with the applati Collapse All
Subject Author Date
chen xinyu Oct 9, 2009 - 2:43 AM

I am using g_PaintManager.InstallPaintManager() to set the style of my applation,but why a class derived from CExtResizableDialog does not
have the style, it is just like a normal dialog.
How can I make it has the same style as the applation?

Thank you!

Technical Support Oct 10, 2009 - 5:08 AM

The CExtResizableDialog windows automatically use the style provided by the paint manager. The dialog controls are themed only if they are subclassed with the Prof-UIS class instances. You can invoke the SetAutoSubclassChildControls() method in the constructor of your CExtResizableDialog-derived class and the dialog will automatically subclass all the unsubclassed dialog controls with the dynamic instances of Prof-UIS classes.

chen xinyu Oct 10, 2009 - 7:56 AM

I did it as you said, but it did not work. My applation is not created by wizard, if this is the reason.

What I did is as followed:

IMPLEMENT_DYNCREATE(CProcessDlg, CExtResizableDialog)

CProcessDlg::CProcessDlg(CWnd* pParent /*=NULL*/)

: CExtResizableDialog(CProcessDlg::IDD, pParent)



 m_clrClient = RGB(100,180,60);

 m_Name = "Process Bar";


But the border of the dialog is just as the normal VC style.

Technical Support Oct 12, 2009 - 3:52 AM

The non-client area theming is not the business of the CExtResizableDialog class. The CExtNCW template decorator provides other windows with themed caption and borders. You should derived your dialog class from the CExtNCW < CExtResizableDialog > class.

chen xinyu Oct 13, 2009 - 7:30 AM

Thank you, I have delt the problem as you said. Thank you very much.