Thread: windows resources

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    13

    windows resources

    Hi

    I'm trying to make a simple menu for my windows program

    this is what the code in the .rc file looks like

    Code:
    GenMenu MENU
    BEGIN
         POPUP          "&Help"
         BEGIN
             MENUITEM  "About...",  IDM_ABOUT
         END
    END
    but when I compile I get an error


    15 C:\Documents and Settings\Kathy\Desktop\WindowsApp\WinApp.rc [Resource error] syntax error

    because of this line

    Code:
             MENUITEM  "About...",  IDM_ABOUT
    Can anybody help?

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    How have you defined IDM_ABOUT? If you have it in a separate resource header then make sure you #include it in your resource script (*.rc). If you don't have it defined then you will obviously need to do so.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    137
    is IDM_ABOUT defined?

    like this somewhere:

    #define IDM_ABOUT 9012

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    Thanks,

    I did forget to include the header in the resource file, i put it in the .cpp file

    now my menus dissapeared in the window altogether though.
    probably something silly. i'll go track down what i did
    Last edited by myk_raniu; 05-04-2006 at 05:12 PM.

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    137
    Make sure you have this in your RC file at the top:

    #define APSTUDIO_READONLY_SYMBOLS
    #include <windows.h>
    #undef APSTUDIO_READONLY_SYMBOLS

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  2. Mingw resources - Example not working.
    By Blackroot in forum Tech Board
    Replies: 1
    Last Post: 09-02-2006, 06:21 AM
  3. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM