Thread: stuck with adding a MENUITEM

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

    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 09: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
    319
    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, 03: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, 02:44 PM
  4. Help with editor windows with win api
    By NightStalker in forum Windows Programming
    Replies: 1
    Last Post: 03-13-2003, 03:53 AM