vc++ problem."resource.h"

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2007
Posts: 1
Reputation: ineedurhelp is an unknown quantity at this point 
Solved Threads: 0
ineedurhelp ineedurhelp is offline Offline
Newbie Poster

vc++ problem."resource.h"

 
0
  #1
Dec 31st, 2007
I know that this is a c++ forum but im a college student and i cant practice the programs without clearing this problem coz most of the programs require "resource.h"

this program is to attach a menu to a window
  1. #include<afxwin.h>
  2. #include"resource.h"
  3. class myframe:public CFrameWnd
  4. {
  5. public:
  6. myframe()
  7. {
  8. Create(0,"hello mfc",WS_OVERLAPPEDWINDOW,rectDefault,0,MAKEINTRESOURCE(IDR_MENU1));
  9. }
  10. };
  11. class myapp:public CWinApp
  12. {
  13. public:
  14. int InitInstance()
  15. {
  16. myframe *p;
  17. p=new myframe;
  18. p->ShowWindow(3);
  19. m_pMainWnd=p;
  20. return 1;
  21. }
  22. };
  23. myapp a;
THIS IS THE ERROR IM GETTING ON COMPLING THE PROGRAM.
fatal error C1083: Cannot open include file: 'resource.h': No such file or directory

I have already clicked on insert then resource then menu then new.
After this i saved it and put script 1 in the same drive,ie C Drive Program files.
I then right clicked resource and clicked on add file folder.
what have I done wrong or what more must I do.
For any of u who have Yashavant Kanethkar's Visual C++ programing.this program is from there.Ch3:Introuction to MFC.
Thanks a lot.
Last edited by Ancient Dragon; Dec 31st, 2007 at 7:21 am. Reason: add code tags
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,365
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: vc++ problem."resource.h"

 
0
  #2
Dec 31st, 2007
what compiler are you using? resource.h must be in the same directory as the project *.cpp or *.c files.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC