Thread: Resources in DevC++

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    202

    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?
    "Christ died for our sins. Dare we make his martyrdom meaningless by not committing them?"

  2. #2
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    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.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    202
    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.
    "Christ died for our sins. Dare we make his martyrdom meaningless by not committing them?"

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    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.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    202
    Both of those are done but Im still getting a parse error on line 7(the second MenuItem)
    "Christ died for our sins. Dare we make his martyrdom meaningless by not committing them?"

  6. #6
    ‡ †hë Ö†hÈr sîÐè ‡ Nor's Avatar
    Join Date
    Nov 2001
    Posts
    299
    if you find out how to get it to work i think you'd be the first.
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

  7. #7
    Registered User
    Join Date
    Nov 2001
    Posts
    202
    in other words I can't make a Win32 App with menu's in DevC++??
    "Christ died for our sins. Dare we make his martyrdom meaningless by not committing them?"

  8. #8
    ‡ †hë Ö†hÈr sîÐè ‡ Nor's Avatar
    Join Date
    Nov 2001
    Posts
    299
    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
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

  9. #9
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Resources in Dev C++
    By JJFMJR in forum Windows Programming
    Replies: 7
    Last Post: 08-27-2007, 05:14 AM
  2. measuring system resources used by a function
    By Aran in forum C Programming
    Replies: 1
    Last Post: 03-13-2006, 05:35 PM
  3. Storing resources into a single file
    By LuckY in forum Game Programming
    Replies: 20
    Last Post: 08-14-2004, 11:28 PM
  4. GlobalMemoryStatus to get "system resources free&
    By hanhao in forum Windows Programming
    Replies: 0
    Last Post: 03-20-2004, 02:30 AM
  5. Adding resources
    By nima_ranjbar in forum Windows Programming
    Replies: 0
    Last Post: 04-14-2002, 11:36 PM