Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error C2065: 'IDD_DIALOG1' : undeclared identifier

Status
Not open for further replies.

d00ape

Programmer
Apr 2, 2003
171
SE
How come I got the following error when including my dialog1.h file twice in separate files.
The compiler brakes at:

class CDialog1 : public CDialog
{
// Construction
public:
CDialog1 (CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CADTTOSIMDialog)
enum { IDD = IDD_ CDIALOG1 }; // BRAKES HERE AND GIVES THE ERROR: error C2065: 'IDD_DIALOG1' : undeclared identifier
//}}AFX_DATA

};


This error is followed by the “error C2057: expected constant expression”

Thanks
 
It looks as though you have a typo somewhere

Check you have a definition for IDD_CDIALOG1 (which also has a space in in your code snippet, which will cause problems)

Code:
enum { IDD = IDD_ CDIALOG1 };

It might be supposed to be
Code:
enum { IDD = IDD_CDIALOG1 };
or
Code:
enum { IDD = IDD_DIALOG1 };





Go not to cats for advice for they will just walk over the keyboard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top