windows resources

This is a discussion on windows resources within the Windows Programming forums, part of the Platform Specific Boards category; Hi I'm trying to make a simple menu for my windows program this is what the code in the .rc ...

  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 06: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, 07: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, 06:31 PM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 10:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21