Hi..I am trying to learn VC++.NET.
Well, I am trying to create this Main Menu using Win32.
This is the code that I have...
#include <afxwin.h>
class CResFrame : public CFrameWnd
{
public:
CResFrame()
{
Create(NULL, "Resources Fundamentals", WS_OVERLAPPEDWINDOW,
CRect(200, 120, 640, 400), NULL, MAKEINTRESOURCE(IDR_MENU_RES));
}
};
class CResApp: public CWinApp
{
public:
BOOL InitInstance()
{
m_pMainWnd = new CResFrame;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
};
CResApp theApp;
Problem: Well, I created a menu in the resource view and I have called it's ID to IDR_MENU_RES, for the Indentifier to be recognized, I am using the macro (MAKEINTRESOURCE(IDR_MENU_RES)) as above in the code, this should work, but it's giving this error.
error C2065: 'IDR_MENU_RES' : undeclared identifier
I have no idea why? Please help...
Sunny
Well, I am trying to create this Main Menu using Win32.
This is the code that I have...
#include <afxwin.h>
class CResFrame : public CFrameWnd
{
public:
CResFrame()
{
Create(NULL, "Resources Fundamentals", WS_OVERLAPPEDWINDOW,
CRect(200, 120, 640, 400), NULL, MAKEINTRESOURCE(IDR_MENU_RES));
}
};
class CResApp: public CWinApp
{
public:
BOOL InitInstance()
{
m_pMainWnd = new CResFrame;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
};
CResApp theApp;
Problem: Well, I created a menu in the resource view and I have called it's ID to IDR_MENU_RES, for the Indentifier to be recognized, I am using the macro (MAKEINTRESOURCE(IDR_MENU_RES)) as above in the code, this should work, but it's giving this error.
error C2065: 'IDR_MENU_RES' : undeclared identifier
I have no idea why? Please help...
Sunny