E:\work\DialogModal\DialogProperty1.cpp(20) : error C2664: '__thiscall CPropertyPage::CPropertyPage(unsigned int,unsigned int)' : cannot convert parameter 2 from 'class CWnd *' to 'unsigned int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
我做一个属性表,在做属性页的时候,忘了把对话框的基类改为CPropertyPage,还是CDialog,做完才发现这个问题,于是我手工改了一下,改完就出现这个问题了。。各位大大谁能告诉我怎么解决?
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
我做一个属性表,在做属性页的时候,忘了把对话框的基类改为CPropertyPage,还是CDialog,做完才发现这个问题,于是我手工改了一下,改完就出现这个问题了。。各位大大谁能告诉我怎么解决?
//{{AFX_MSG_MAP(CDialogProperty1)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()改过了。。CDialogProperty1::CDialogProperty1(CWnd* pParent /*=NULL*/)
: CPropertyPage(CDialogProperty1::IDD, pParent)
{
//{{AFX_DATA_INIT(CDialogProperty1)
m_nRadius = 0;
//}}AFX_DATA_INIT
}出问题的地方是这个结构。请指教
: CPropertyPage(CDialogProperty1::IDD, pParent)
这个也要改
CDialogProperty1::CDialogProperty1(CWnd* pParent /*=NULL*/)
: CPropertyPage(CDialogProperty1::IDD)
CDialogProperty1::CDialogProperty1(CWnd* pParent /*=NULL*/)
: CDialog(CDialogProperty1::IDD, pParent) 修改以后,继承CPropertyPage,构造函数参数就少了第二个
CDialogProperty1::CDialogProperty1(CWnd* pParent /*=NULL*/)
: CPropertyPage(CDialogProperty1::IDD)