R/Sir
Colud you please help me in solving the error in my program's comiplation:
Below is the program:- Program to attach a menu to a window.
class myframe : public CFrameWnd { public : myframe() { Create(0, "Hello MFC", WS_OVERLAPPEDWINDOW,rectDefault,0, MAKEINTRESOURCE(IDR_MENU1)); } };
class myapp : public CWinApp { public : int InitInstance() { myframe *p; p=new myframe; p->ShowWindow(1); m_pMainWnd=p;
return 1;
}
};
myapp a;
following error comes:-
Compiling... f1.cpp C:Program FilesMicrosoft Visual StudioMyProjectshello�1.cpp(2) : fatal error C1083: Cannot open include file: 'resource.h': No such file or directory Error executing cl.exe.
hello.exe - 1 error(s), 0 warning(s)
Thanking you, Sanjeev
Make sure that you have a file called "resource.h" in the project directory which contains the line:
(If you had created a resource (eg. menu) using the resource editor of Visual studio, this file would be automatically created.)
Advertisement