hi,
i'm new to mfc vc++ programming,
when i write following code i get error
pls help me
here is the whole code:
i'm new to mfc vc++ programming,
when i write following code i get error
Code:
Error 1 error C2065: 'IDE_ACCELERATOR1' : undeclared identifier c:\documents and settings\nitin.mycomputer\desktop\mfc keyboard keys\mfc keyboard keys\mfc keyboard keys.cpp 10
here is the whole code:
Code:
#include "stdafx.h"
#include<afxwin.h>
#include "Resource.h"
class myframe:public CFrameWnd
{
public:
myframe()
{
LoadAccelTable(MAKEINTRESOURCE(IDE_ACCELERATOR1));
Create(0,TEXT("Accelerator"),WS_OVERLAPPEDWINDOW,rectDefault,0,MAKEINTRESOURCE(IDR_MENU1));
}
void fun1()
{
MessageBox(TEXT("Reached here to draw a line"),TEXT("Title"));
}
void fun2()
{
MessageBox(TEXT("Reached here to draw a Rectangle"),TEXT("Title"));
}
void fun3()
{
MessageBox(TEXT("Reached here to draw a Circle"),TEXT("Title"));
}
void fun4()
{
MessageBox(TEXT("Reached here to draw a Triangle"),TEXT("Title"));
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myframe,CFrameWnd)
ON_COMMAND(101,fun1)
ON_COMMAND(102,fun2)
ON_COMMAND(103,fun3)
ON_COMMAND(104,fun4)
END_MESSAGE_MAP()
class myapp:public CWinApp
{
public:
int InitInstance()
{
myframe *p;
p=new myframe;
p->ShowWindow(3);
m_pMainWnd=p;
return 1;
}
};
myapp a;
Comment