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 SkipVought 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_PROJECT1' : undeclared identifier

Status
Not open for further replies.

eboxbd

Programmer
Dec 22, 2002
10
0
0
HK
I can not resume the following errors in a vc++ project.

c:\project1\project1dlg.h(20) : error C2065: 'IDD_PROJECT1DLG_DIALOG' : undeclared identifier

c:\project1\project1dlg.h(20) : error C2057: expected constant expression

c:\project1\project1.h(23) : error C2065: 'IDD_PROJECT1' : undeclared identifier

c:\project1\project1.h(23) : error C2057: expected constant expression

pls help.
Haider
 
It might be due to that U may have created a dialog at run but not have declared in resource.h
 
in your .h file for the class that belongs to your dialog, you will find a line that looks something like

Code:
enum { IDD = IDD_TESTPRB_DIALOG };

where IDD_TESTPRB_DIALOG is the original name of your dialog. i have had it happen where my dialog has been renamed by accident and my code wont compile. its because the dialog name got changed but this line didnt. it still refers to the old name.

the key is to make sure the dialog name matches what is in your enum and that it also matches what is in your resource.h file.

hope that helps
[ponytails2]
 
Thanks sskumar and txjump.

It is declared in resource.h


It has been renamed. But it also has been modified in the following:

enum { IDD = IDD_TESTPRB_DIALOG };

Looking for your help.
 
just to clarify what you said above...

the IDD name in your resource file matches the name that shows up in the dialog properties and it matches what you have in the enum. it this example all three places should have the name IDD_EBOXBDS_DLG_NAME.

Code:
//resource.h file
#define IDD_EBOXBDS_DLG_NAME   //with whatever number is supposed to follow

//dialog.h file
enum { IDD = IDD_EBOXBDS_DLG_NAME };

//dialog properties box
ID  IDD_EBOXBDS_DLG_NAME

is that what you did?

txjump
[ponytails2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top