hiding unused menus using MFC
-
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?
-
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?
Hope you will find the answer from this MSDN page Using Drop-Down Buttons in a Toolbar Control[^]
-
Hope you will find the answer from this MSDN page Using Drop-Down Buttons in a Toolbar Control[^]
No. That MSDN page is about Toolbar. I'm looking for menu. Similar to MS word menus or Windows XP Start-Programs menu.
-
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?
About hiding a menuitem, you may try
ON_UPDATE_COMMAND_UI
view this page for example [^] -
No. That MSDN page is about Toolbar. I'm looking for menu. Similar to MS word menus or Windows XP Start-Programs menu.
Handle
WM_INITMENUPOPUP
, seeCWnd::OnInitMenuPopup
in your doc. cheers, AR -
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?
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.
-
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.
I suppose you have use owner drawn menu option to design your menu. nss
-
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?
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.
-
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.
No, I'm using 6.0. If I upgrade to VS2008, this feature will come by default. Thanks for your reply.