-
March 2nd, 2010, 07:38 AM
#1
dialog id undeclared identified
i have created win32 application with MFC in a shared Dll.
i have include a dialog with ID = IDD_DIALOG.i have created class for dialog which is CSettingsDlg derived from CDialog.
and included header
Code:
class CSettingsDlg : public CDialog
{
DECLARE_DYNAMIC(CSettingsDlg)
public:
CSettingsDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CSettingsDlg();
// Dialog Data
enum { IDD = IDD_DIALOG1 };// error C2065: 'IDD_DIALOG1' : undeclared identifier
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
};
i am getting an error :
error C2065: 'IDD_DIALOG1' : undeclared identifier
what should i do ?
Last edited by dskp; March 2nd, 2010 at 07:44 AM.
-
March 2nd, 2010, 07:56 AM
#2
Re: dialog id undeclared identified
error C2065: 'IDD_DIALOG1' : undeclared identifier
a variable’s type must be specified in a declaration before it can be used. The parameters that a function uses must be specified in a declaration, or prototype, before the function can be used.
-
March 2nd, 2010, 08:07 AM
#3
Re: dialog id undeclared identified
what should i do.i dint understand.
-
March 2nd, 2010, 08:10 AM
#4
Re: dialog id undeclared identified
What kind of dll did you make ? To have dialogs in a MFC dll it needs to be a MFC extension dll instead of a regular dll.
-
March 2nd, 2010, 08:19 AM
#5
Re: dialog id undeclared identified
Are you sure you are including "resource.h" where it is needed?
Gort...Klaatu, Barada Nikto!
-
March 2nd, 2010, 08:21 AM
#6
Re: dialog id undeclared identified
i didn't use any dll.
what i meant i took a "win32 application" and in project setting i took "MFC in a shared Dll" option since i am using MFC support thats all.
-
March 2nd, 2010, 08:22 AM
#7
Re: dialog id undeclared identified
-
March 2nd, 2010, 08:23 AM
#8
Re: dialog id undeclared identified
did you include the resource.h file
-
March 2nd, 2010, 08:26 AM
#9
Re: dialog id undeclared identified
Use the resource editor and make sure you actually have a resource with that ID.
Gort...Klaatu, Barada Nikto!
-
March 2nd, 2010, 08:49 AM
#10
Re: dialog id undeclared identified
i observed this :-
Code:
resource.h
#define IDD_DIALOG1 104
.cpp
// Dialog Data
enum { IDD = 104 }; //when i include this its is working
//enum { IDD = IDD_DIALOG1 };//when in include its not working
-
March 2nd, 2010, 09:16 AM
#11
Re: dialog id undeclared identified
Gort...Klaatu, Barada Nikto!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|