Thread: MainMenu class

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C / C++
    Join Date
    Jan 2006
    Location
    The Netherlands
    Posts
    312
    Ok, now I have resources.rc:

    Code:
    #include <windows.h>
    #include "resource.h"
    
    MainMenu MENU DISCARDABLE
    
    BEGIN
             POPUP "File"
             BEGIN
                   MENUITEM "Open", MENU_FILE_ID_OPEN
    
                   MENUITEM "Close", MENU_FILE_ID_CLOSE
             END
             POPUP "Help"
             BEGIN
                   MENUITEM "About", MENU_HELP_ID_ABOUT
             END
    END
    resource.h:

    Code:
    #define MENU_FILE_ID_OPEN 100
    
    #define MENU_FILE_ID_CLOSE 102
    
    #define MENU_HELP_ID_ABOUT 102
    
    #define MainMenu 103
    and in wc.cpp:

    Code:
    #include "resource.h"
    
    // rest of script
    
    wc.lpszMenuName = "MainMenu";
    
    // rest of script
    No errors and no menu!
    Operating Systems:
    - Ubuntu 9.04
    - XP

    Compiler: gcc

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Try:
    Code:
    wc.lpszMenuName = MAKEINTRESOURCE(MainMenu);
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    C / C++
    Join Date
    Jan 2006
    Location
    The Netherlands
    Posts
    312
    No, doesn't work.
    Operating Systems:
    - Ubuntu 9.04
    - XP

    Compiler: gcc

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Class design problem
    By h3ro in forum C++ Programming
    Replies: 10
    Last Post: 12-19-2008, 09:10 AM
  2. Specializing class
    By Elysia in forum C++ Programming
    Replies: 6
    Last Post: 09-28-2008, 04:30 AM
  3. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  4. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM