(LPCTSTR)IDD_MAIN_DLG,

Hi,

The following code is transcribed from a video tutorial. My VS2013 suggests that IDD_Main_DLG is undeclared.

I checked again and again, but I don't know why it is wrong. The tutor on the video made it, but I failed.

Could anyone please help? Many thanks!


1
2
3
4
5
6
7
8
9
10
11
12
#include "resource.h"
#include <windows.h>

INT_PTR CALLBACK theProc(HWND   hwndDlg, UINT   uMsg, WPARAM wParam, LPARAM lParam)
{
	return 0;
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLind, int nCmdshow)
{
DialogBox (hInstance,(LPCTSTR)IDD_MAIN_DLG, NULL, theProc);
return 0; `
}
Where did you declare it?
Normally you would do it in resource.h and use it the .rc file.
Thank you for your reply
You are welcome.
Is it working now ?
Topic archived. No new replies allowed.