遇到这个编译器错误的问题,我不知道它在提示什么。如果有人可以提供帮助,我将不胜感激。这是错误:
Error 1 error C2664: 'CPropertyPage::CPropertyPage(UINT,UINT,DWORD)' : cannot convert parameter 2 from 'CWnd *' to 'UINT' c:\users\bnason.prolec\documents\visual studio 2005\projects\autorepair1\autorepair1\customerinformationdlg.cpp 20
这是似乎导致它的代码:
CRepairOrderSheet::CRepairOrderSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
this->AddPage(&dlgCustomerInformation);
this->AddPage(&dlgJobsAndParts);
this->AddPage(&dlgRepairSummary);
}
最佳答案
CPropertyPage
构造函数接受三个参数:UINT
, UINT
, 和 DWORD
.不清楚您的CRepairOrderSheet
源自 CPropertyPage
或 CPropertySheet
(未提供相关信息),但编译器认为您正在尝试构建 CPropertyPage
.你正在通过它LPCTSTR
, CWnd*
和 UINT
.编译器无法获得匹配的类型。
关于visual-c++ - 编译器错误 C2664,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8012504/