Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. right-aligned shortcuts in popup menu

right-aligned shortcuts in popup menu

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 4 Posters 26 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dovgan Vitaliy
    wrote on last edited by
    #1

    How can I create a menu with right-aligned shortcuts? I mean a menu that looks as follows: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- right-aligned Because a standard menu looks like this: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- left-aligned

    T V U 3 Replies Last reply
    0
    • D Dovgan Vitaliy

      How can I create a menu with right-aligned shortcuts? I mean a menu that looks as follows: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- right-aligned Because a standard menu looks like this: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- left-aligned

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      shorcuts are automatically right aligned if they are assigned correctly to the menu item.


      TOXCCT >>> GEII power

      [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

      1 Reply Last reply
      0
      • D Dovgan Vitaliy

        How can I create a menu with right-aligned shortcuts? I mean a menu that looks as follows: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- right-aligned Because a standard menu looks like this: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- left-aligned

        V Offline
        V Offline
        Viorel
        wrote on last edited by
        #3

        I think you missed to put a tab character ("\t") in your menu definition. Menu item strings with shortcuts must look like this: "Find**\tCtrl+F", "Find Next\t**F3".

        D 1 Reply Last reply
        0
        • V Viorel

          I think you missed to put a tab character ("\t") in your menu definition. Menu item strings with shortcuts must look like this: "Find**\tCtrl+F", "Find Next\t**F3".

          D Offline
          D Offline
          Dovgan Vitaliy
          wrote on last edited by
          #4

          I have *.rc file with ... MENUITEM "Find\tCtrl+F", IDM_SEARCH_FIND MENUITEM "FindNext\tF3", IDM_SEARCH_FINDNEXT ... And the menu looks like this: |___________________| |_Find ______Ctrl+F_| |_Find_Next__F3_____| <-- F3 is left-aligned But I want the menu to look like this: |___________________| |_Find ______Ctrl+F_| |_Find_Next______F3_| <-- F3 is right-aligned

          V 1 Reply Last reply
          0
          • D Dovgan Vitaliy

            I have *.rc file with ... MENUITEM "Find\tCtrl+F", IDM_SEARCH_FIND MENUITEM "FindNext\tF3", IDM_SEARCH_FINDNEXT ... And the menu looks like this: |___________________| |_Find ______Ctrl+F_| |_Find_Next__F3_____| <-- F3 is left-aligned But I want the menu to look like this: |___________________| |_Find ______Ctrl+F_| |_Find_Next______F3_| <-- F3 is right-aligned

            V Offline
            V Offline
            Viorel
            wrote on last edited by
            #5

            It seems that the current implementation of Windows’ built-in menus does not support alignment you requested. Some other custom menu engines support this, for instance one used in C# applications. In C++, you can try some third-party owner-drawn custom menus. For instance: BCMenu (http://www.codeproject.com/menu/bcmenu.asp[^]), which supports various features. Please see if it is suitable for you. Alternatively search for another one, if you are not going to implement you own menus.

            1 Reply Last reply
            0
            • D Dovgan Vitaliy

              How can I create a menu with right-aligned shortcuts? I mean a menu that looks as follows: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- right-aligned Because a standard menu looks like this: ----------------- Search ----------------- Find Ctrl+F Find Next F3 <-- left-aligned

              U Offline
              U Offline
              User 7723383
              wrote on last edited by
              #6

              Vitaliy, Sorry for this out-of-band contact but I didn't want to pollute the currently active github conversation, nor notify others that we had an out-of-band conversation. I assume you are the same as the author of the "SEH exception...global mock" bug report regarding GoogleTest? If so, I would like to chat with you. I am 'phonetagger'. Please contact me at: m m i n i c h 8 7 (atsign) yahoo dot com Hopefully I can delete this post once you've contacted me.

              U 1 Reply Last reply
              0
              • U User 7723383

                Vitaliy, Sorry for this out-of-band contact but I didn't want to pollute the currently active github conversation, nor notify others that we had an out-of-band conversation. I assume you are the same as the author of the "SEH exception...global mock" bug report regarding GoogleTest? If so, I would like to chat with you. I am 'phonetagger'. Please contact me at: m m i n i c h 8 7 (atsign) yahoo dot com Hopefully I can delete this post once you've contacted me.

                U Offline
                U Offline
                User 7723383
                wrote on last edited by
                #7

                ...also sorry if I got your first & last names confused... I think I did. Sorry!

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups