Thread: Subcatagories for Menus?

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    39

    Subcatagories for Menus?

    I've been experimenting with menus recently and I have one question, that I believe my book doesn't go over...

    How do you make a subcatagory for a menu item? Such as:

    Code:
    File -> New ->Project
    To create the menu for the window, I have this code so far:

    Code:
    #include "MYMENU.H"
    
    MYMENU MENU DISCARDABLE
    BEGIN
        POPUP "File"
        BEGIN
            MENUITEM "Open",     ID_MYMENU_FILE_OPEN
            MENUITEM "Save",    ID_MYMENU_FILE_SAVE
            MENUITEM "Exit",     ID_MYMENU_FILE_EXIT
        END
        POPUP "Help"
        BEGIN
            MENUITEM "About",    ID_MYMENU_HELP_ABOUT
        END
    END
    What would I add to that to make the subcatagory?

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    To create the menu for the window, I have this code so far:
    errr...what language is that?

  3. #3
    Chief Code Coloniser!
    Join Date
    Apr 2005
    Posts
    121
    It's not C++

    This is a windows resources question, and hence should be posted in the Windows forum. However, I shall answer anyway

    Code:
    MYMENU MENU DISCARDABLE
    BEGIN
        POPUP "File"
        BEGIN
            POPUP "New"
            BEGIN
                MENUITEM "Project",     ID_MYMENU_FILE_NEW_PROJECT
            END
            MENUITEM "Open",     ID_MYMENU_FILE_OPEN
            MENUITEM "Save",    ID_MYMENU_FILE_SAVE
            MENUITEM "Exit",     ID_MYMENU_FILE_EXIT
        END
        POPUP "Help"
        BEGIN
            MENUITEM "About",    ID_MYMENU_HELP_ABOUT
        END
    END

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    It's not C++

    This is a windows resources question
    I considered that, but I have a Visual C++ program with a menu, and I looked through all the resource files, and I couldn't find anything in any of the files that looked like that. What file should I be looking in?

  5. #5
    Chief Code Coloniser!
    Join Date
    Apr 2005
    Posts
    121
    .rc files.

Popular pages Recent additions subscribe to a feed