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. hiding unused menus using MFC

hiding unused menus using MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
9 Posts 5 Posters 0 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.
  • S Offline
    S Offline
    Syama Sundar
    wrote on last edited by
    #1

    I have seen menus in MS word 2002, they hide unused menus and display them only when you move to the dowble arrow shown at the bootom of the menu. How to implement this feature in a MFC application?

    M S M 4 Replies Last reply
    0
    • S Syama Sundar

      I have seen menus in MS word 2002, they hide unused menus and display them only when you move to the dowble arrow shown at the bootom of the menu. How to implement this feature in a MFC application?

      M Offline
      M Offline
      Madhu Nair 0
      wrote on last edited by
      #2

      Hope you will find the answer from this MSDN page Using Drop-Down Buttons in a Toolbar Control[^]

      S 1 Reply Last reply
      0
      • M Madhu Nair 0

        Hope you will find the answer from this MSDN page Using Drop-Down Buttons in a Toolbar Control[^]

        S Offline
        S Offline
        Syama Sundar
        wrote on last edited by
        #3

        No. That MSDN page is about Toolbar. I'm looking for menu. Similar to MS word menus or Windows XP Start-Programs menu.

        A 1 Reply Last reply
        0
        • S Syama Sundar

          I have seen menus in MS word 2002, they hide unused menus and display them only when you move to the dowble arrow shown at the bootom of the menu. How to implement this feature in a MFC application?

          M Offline
          M Offline
          Madhu Nair 0
          wrote on last edited by
          #4

          About hiding a menuitem, you may try ON_UPDATE_COMMAND_UI view this page for example [^]

          1 Reply Last reply
          0
          • S Syama Sundar

            No. That MSDN page is about Toolbar. I'm looking for menu. Similar to MS word menus or Windows XP Start-Programs menu.

            A Offline
            A Offline
            Alain Rist
            wrote on last edited by
            #5

            Handle WM_INITMENUPOPUP, see CWnd::OnInitMenuPopup in your doc. cheers, AR

            1 Reply Last reply
            0
            • S Syama Sundar

              I have seen menus in MS word 2002, they hide unused menus and display them only when you move to the dowble arrow shown at the bootom of the menu. How to implement this feature in a MFC application?

              S Offline
              S Offline
              Syama Sundar
              wrote on last edited by
              #6

              Let me elaborate my requirement. I want to hide the menu items which are not used often by the user. Show only the menu items which are frequently used. Provide an arrow (MS word shows two down arrows one below the other) as last item in menu. When the user places his cursor on this arrow show all menu items. If user clicks on any item which was hidden, bring it to frequently used list and show it by default next time. The implementation wil be: I have to track all menu clicks of user and store them along with date and time. When it becomes one month old move it to rarely used list. I may have to use a database or a data file. Show an arrow (how?) when some items are hidden. Show all items when the cursor is on arrow (not on click) (How?) As I have to start the project from scratch, I'm looking for some inputs who has already implemented so that I can implement in optimized way.

              S 1 Reply Last reply
              0
              • S Syama Sundar

                Let me elaborate my requirement. I want to hide the menu items which are not used often by the user. Show only the menu items which are frequently used. Provide an arrow (MS word shows two down arrows one below the other) as last item in menu. When the user places his cursor on this arrow show all menu items. If user clicks on any item which was hidden, bring it to frequently used list and show it by default next time. The implementation wil be: I have to track all menu clicks of user and store them along with date and time. When it becomes one month old move it to rarely used list. I may have to use a database or a data file. Show an arrow (how?) when some items are hidden. Show all items when the cursor is on arrow (not on click) (How?) As I have to start the project from scratch, I'm looking for some inputs who has already implemented so that I can implement in optimized way.

                S Offline
                S Offline
                sthalasayanam
                wrote on last edited by
                #7

                I suppose you have use owner drawn menu option to design your menu. nss

                1 Reply Last reply
                0
                • S Syama Sundar

                  I have seen menus in MS word 2002, they hide unused menus and display them only when you move to the dowble arrow shown at the bootom of the menu. How to implement this feature in a MFC application?

                  M Offline
                  M Offline
                  Maximilien
                  wrote on last edited by
                  #8

                  If you are using Visual Studio 2008 with the Feature Pack (new ui stuff) you can use CMFCMenuBar::SetRecentlyUsedMenus for individual applications. There's a setting in the for the taskbar/start menu that, I think, set the global behavior for all applications. (on vista, so it might not be the same on XP or W7) "Control Panel" -> "Taskbar and Start Menu" -> select "start menu tab" : If you select the "Classic Start Menu" and click on Customize, you can check/uncheck the last option in the list "Use personalized menus" to change the behavior. Google for "personalized menus" for more informations.

                  This signature was proudly tested on animals.

                  S 1 Reply Last reply
                  0
                  • M Maximilien

                    If you are using Visual Studio 2008 with the Feature Pack (new ui stuff) you can use CMFCMenuBar::SetRecentlyUsedMenus for individual applications. There's a setting in the for the taskbar/start menu that, I think, set the global behavior for all applications. (on vista, so it might not be the same on XP or W7) "Control Panel" -> "Taskbar and Start Menu" -> select "start menu tab" : If you select the "Classic Start Menu" and click on Customize, you can check/uncheck the last option in the list "Use personalized menus" to change the behavior. Google for "personalized menus" for more informations.

                    This signature was proudly tested on animals.

                    S Offline
                    S Offline
                    Syama Sundar
                    wrote on last edited by
                    #9

                    No, I'm using 6.0. If I upgrade to VS2008, this feature will come by default. Thanks for your reply.

                    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