stuck with adding a MENUITEM

This is a discussion on stuck with adding a MENUITEM within the Windows Programming forums, part of the Platform Specific Boards category; ive got this for my resource file.. /////////////////resource file//////////////////// BEGIN POPUP "&File" BEGIN MENUITEM "Exit", IDM_EXIT MENUITEM "Internet", IDM_INTERNET END ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    315

    stuck with adding a MENUITEM

    ive got this for my resource file..
    /////////////////resource file////////////////////
    BEGIN

    POPUP "&File"
    BEGIN
    MENUITEM "Exit", IDM_EXIT
    MENUITEM "Internet", IDM_INTERNET
    END
    ////////////////resource file//////////////////////////////////////
    now i tried to do #define IDM_INTERNET

    then put it as a case

    case IDM_INTERNET: //in the switch

    but the compiler spits out a error with
    error with :
    Last edited by Anddos; 03-26-2006 at 08:03 AM.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You don't define it as anything, you need to do at least
    Code:
    #define IDM_INTERNET 1337
    ...or whatever ID it has, which will lead to another problem. How do you know which ID to choose? Don't bother defining these yourself, just include the resource.h file that was created along with the rc file and everything will be done for you (I'm assuming you use VC).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    315
    yeh got it working soon after i posted

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SVN Import Causes Crash
    By Tonto in forum Tech Board
    Replies: 6
    Last Post: 11-01-2006, 02:44 PM
  2. Adding buttons, edit boxes, etc to the window
    By rainmanddw in forum Windows Programming
    Replies: 1
    Last Post: 04-10-2006, 03:07 PM
  3. Text box default contextmenu
    By ChadJohnson in forum Windows Programming
    Replies: 6
    Last Post: 03-28-2005, 01:44 PM
  4. Help with editor windows with win api
    By NightStalker in forum Windows Programming
    Replies: 1
    Last Post: 03-13-2003, 02:53 AM

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