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 ?
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.
Re: dialog id undeclared identified
what should i do.i dint understand.
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.
Re: dialog id undeclared identified
Are you sure you are including "resource.h" where it is needed?
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.
Re: dialog id undeclared identified
Re: dialog id undeclared identified
did you include the resource.h file
Re: dialog id undeclared identified
Use the resource editor and make sure you actually have a resource with that ID.
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
Re: dialog id undeclared identified