bigbaz34
bigbaz34

Reputation: 395

Compiler Error C2664

Having trouble with this compiler error, I can't figure out what its moaning about. If anyone could help I will be very grateful. Here is the error:

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

and here is the code that seems to be causing it:

CRepairOrderSheet::CRepairOrderSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
    :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
        this->AddPage(&dlgCustomerInformation);
        this->AddPage(&dlgJobsAndParts);
        this->AddPage(&dlgRepairSummary);

}

Upvotes: 0

Views: 904

Answers (1)

Raymond Chen
Raymond Chen

Reputation: 45172

The CPropertyPage constructor takes three parameters: UINT, UINT, and DWORD. It's not clear whether your CRepairOrderSheet derives from CPropertyPage or CPropertySheet (information not provided in question), but the compiler thinks you're trying to construct a CPropertyPage. You are passing it LPCTSTR, CWnd* and UINT. The compiler cannot get the types to match up.

Upvotes: 2

Related Questions