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 » compile error when apply skin Collapse All
Subject Author Date
delu qiu May 5, 2006 - 8:12 AM

Hi,

I have a MFC dialog-base project, and I’m trying apply skin to the main dialog CSPSSelection,
In SPSSelection.h, I write
class CSPSSelection:public CExtNCW < CExtResizableDialog>
{
CSPSSelection(CWnd* pParent = NULL); // standard constructor
....
}

but I got compile error in SPSSelection.cpp:
SPSSelection.cpp(31)
error C2614: ’CSPSSelection’ : illegal member initialization: ’CExtResizableDialog’ is not a base or member



this is my code:
CSPSSelection::CSPSSelection(CWnd* pParent /*=NULL*/)
    : CExtResizableDialog(CSPSSelection::IDD, pParent)
{
    //{{AFX_DATA_INIT(CSPSSelection)
    //}}AFX_DATA_INIT
}

How to fix this?
thanks

Technical Support May 5, 2006 - 11:40 AM

Please replace the following code:

CSPSSelection::CSPSSelection(CWnd* pParent /*=NULL*/)
    : CExtResizableDialog(CSPSSelection::IDD, pParent)
{
    //{{AFX_DATA_INIT(CSPSSelection)
    //}}AFX_DATA_INIT
}
with:
CSPSSelection::CSPSSelection(CWnd* pParent /*=NULL*/)
    : CExtNCW < CExtResizableDialog > ( CSPSSelection::IDD, pParent )
{
    //{{AFX_DATA_INIT(CSPSSelection)
    //}}AFX_DATA_INIT
}


delu qiu May 5, 2006 - 9:53 AM

Done,
I changed my code to
CSPSSelection::CSPSSelection(CWnd* pParent /*=NULL*/)
    : CExtNCW < CExtResizableDialog > ( CSPSSelection::IDD,pParent )

Got another question, some MFC resource Properties seems not work after migrate to prof-uis control.
for example,control order property and Transparent property

Technical Support May 5, 2006 - 11:55 AM

Please ensure you have subclassed all the controls in your dialog with Prof-UIS classes. We recommend you specify the WS_CLIPSIBLINGS and WS_CLIPCHILDREN styles for your dialog. If you have group boxes, then please check that the tab order number of each group box is greater than tab order numbers of all the controls inside the group box.