-
Resources in DevC++
Im starting to use DevC++ instead of my outdated Borland. My only problem is I can't get the resources to work. It says there is a GUI resource compiler in the documentation of DevC++ but I can't find it. Also my .rc files doesn't seem to be loading. I typed it in MSVC++ style format instead of borland cause I figured that was more of a "standard". Is that correct? How can I get to the resource editor to make sure my file it set up correctly?
-
To make sure your resource script is being compiled, go to
Project -> Project Options -> Files
and make sure your resource script is being included for compilation.
-
Ok, that was one of my problems, it wasn't being included. Now my next problem is I keep getting parse errors on my menu. Its a VERY simple menu. What is the proper syntax for menus in DevC++
this is my code so far:
Code:
SCTS MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&New", IDM_FILE_NEW
MENUITEM "E&xit", IDM_FILE_EXIT
END
END
like I said very easy and simple I just need to know the syntax.
-
That looks ok provided:
- You have #defined SCTS,IDM_FILE_NEW and IDM_FILE_EXIT.
- You have #included the resource header where you have defined them in your resource script.
-
Both of those are done but Im still getting a parse error on line 7(the second MenuItem)
-
if you find out how to get it to work i think you'd be the first.
-
in other words I can't make a Win32 App with menu's in DevC++??
-
they say you can but i've never been able to get the resource file to compile with dev-c++(big fan of it btw)
so i caved in and got vs.net
-
Well I only use dev-c++ and I have no trouble with resource scripts at all.
You should have-
rscHeader.h
Code:
#define SCTS 5000
#define IDM_FILE_NEW 5001
#define IDM_FILE_EXIT 5002
resource.rc
Code:
#include "rscHeader.h" //You resource header
SCTS MENU
BEGIN
POPUP "&File"
MENUITEM "&New", IDM_FILE_NEW
MENUITEM "&Exit", IDM_FILE_EXIT
END
Make sure that resource.rc (or whatever you are calling it) has 'Include in compilation' check in project option > files ...
There is nothing wrong with that.
Sometimes I find that in dev-cpp the error may occur before the line stated.
OR perhaps you have defined your resource wrong, overloaded something perhaps?
Post the resource file and the resource header please if you have continuing problems so we can help.