|
-
Jan 31st, 2003, 11:31 AM
#1
Visual C++ Resource Management
Grrrrrrrrrr @ Visual Studio
I have created a menu resource (go me ) and created a menu called &File. I create an item on the file called &Open (I'm assuming this might be a common thing people want to do). That automatically assigns the ResourceID of ID_FILE_OPEN. Lovely. It's already defined, along with all the other stuff, when I check the Resource Symbols. So I go to build my project and it claims "error C2065: 'ID_FILE_OPEN' : undeclared identifier". Gah. Is there a specific header I should be referencing? MSDN isn't giving me anything useful.
At the moment I have windows.h referenced, and the file resource.h which was generated by VC++ and contains the ID of my menu, but not the subthingies.
Should I change the identifier so it doesn't clash with the read-only ones?
And another question - how should I structure my message loop? I'm assuming that tying the file opening code into the loop is bad, and when it sees a ID_FILE_OPEN message (or whatever it ends up being) that it should call some other code. If these functions go in another .cpp (would that be a bad plan?) do i put '#include "myotherfile.cpp"' in the code? Or is that just for header files?
Thanks
Chris
-
Feb 8th, 2003, 06:24 PM
#2
VC++ should generate a resource.h file that you must include.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|