![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
#including resource file causing window procedure to be undeclared???ok, this is getting really annoying. i have this program that, so far, just displays a window with an edit control in the middle and exits when you press escape. it doesn't even have a menu. however, i am trying to add a menu now, and therein lies my frustrating problem. when i add the include line at the top of my program after the inclusion of my header file and windows.h but before my function declarations, like this:
CPP / C++ / C Code:
Quote:
can anyone help? the attachment mechanism is not working for me right now, so my complete source files are posted here: http://www.geocities.com/zapguyd/dow...ekedit.cpp.txt http://www.geocities.com/zapguyd/dow...geekedit.h.txt http://www.geocities.com/zapguyd/dow...eekedit.rc.txt things of note: 1. if i comment out #include "geekedit.rc" then there are no errors. 2. this program is a work in progress, so there may be things in the code that are not commented out--these are things that are buggy right now, or that i have replaced with something else and have not gotten around to deleting yet. right now i am just trying to figure out this one problem; everything worked before i tried to include the resource file. 3. the compiler errors seem to indicate that there is also something wrong with the CPP / C++ / C Code:
4. i realize that the line that will actually add the menu to my window class is commented out. again, i am just trying to fix this problem, then i will move on. |
|
#2
|
|||
|
|||
|
You don't include resource files, use pragma, like so:
CPP / C++ / C Code:
Or link it to your object file(s) when compiling. Last edited by Dr. Evil : 07-Feb-2005 at 07:33.
|
|
#3
|
|||
|
|||
|
but my resource file is not geekedit.res, it is geekedit.rc
i replaced #include "geekedit.rc" with #pragma resource "geekedit.rc" and i get these errors: Quote:
apparently i do not have the correct format for a menu in a resource file i would be greatly obliged if someone could help with this latest quagmire ;-) |
|
#4
|
|||
|
|||
|
nevermind
apparently i don't even have to use the #pragma, just adding the resource file to the dev-c++ project does it also, i didn't have the values for the menu items #defined....doh! anyway, it works, thanks dr. evil |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
| Re: Programming Techniques | WaltP | C Programming Language | 0 | 09-Mar-2004 23:56 |
| [Tutorial] Standard I/O | aaroncohn | C Programming Language | 20 | 27-Feb-2004 21:07 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The