Adding a bar to the Menu? (C++)

This is a discussion on Adding a bar to the Menu? (C++) within the Windows Programming forums, part of the Platform Specific Boards category; On menus I have seen little bars bettween the menu options. For an example if you are using IE. Click ...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Exclamation Adding a bar to the Menu? (C++)

    On menus I have seen little bars bettween the menu options.
    For an example if you are using IE. Click "File" on the menu, and
    you will see how there is one of those little bars bettween
    "Save as..." and "Page Setup..." How do you create one of those?

    Thanks in advance, August.

  2. #2
    Chief Code Coloniser!
    Join Date
    Apr 2005
    Posts
    121
    You need to use separators.

    eg
    Code:
    FirstMenu MENU
    {
     POPUP "&PopUp"
            {
             MENUITEM "&Say Hello",IDM_HELLO
             MENUITEM "Say &GoodBye", IDM_GOODBYE
             MENUITEM SEPARATOR
             MENUITEM "E&xit",IDM_EXIT
            }
     MENUITEM "&Test", IDM_TEST
    }

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    How can I add that to this?

    hSubMenu = CreatePopupMenu();
    AppendMenu(hSubMenu, MF_STRING, ID_OPTIONS_SHOW, "&Show");
    AppendMenu(hSubMenu, MF_STRING, ID_OPTIONS_GO, "&Go");
    AppendMenu(hSubMenu, MF_STRING, ID_OPTIONS_CHECK, "&Check");
    AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Options");

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Code:
    AppendMenu(hSubMenu, MF_SEPARATOR, 0, NULL);

  5. #5
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Thanks, thats what I was looking for!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 10:25 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  4. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 04:41 AM

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