Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Rarely used menu items Collapse All
Subject Author Date
Alexey Zbritsky Jan 31, 2005 - 5:56 AM

Hello.


I use CExtToolControlBar, and for some buttons set up separate dropdown style and menu. When i click on dropdown button first, all menu items are hidden.


What should i do to make items of these menus only always visible?


This toolbar and menus used in dialog derived from CExtResizableDialog.


Thanks


PS. About my previous topic - it works very well. Thanks


 

Technical Support Jan 31, 2005 - 9:40 AM

We can guess that you forgot to mark commands in the button menu as basic. The basic commands are always initially visible in any pop-up menu and this does not depend on their usage statistics. You need to specify their command identifiers in the g_CmdManager->SetBasicCommands(...) calls. You may take a look at the CMainFrame::OnCreate() method of the DRAWCLI sample application for details. If you don’t need expandable menus at all, just invoke:

CExtPopupMenuWnd::g_bMenuExpanding = false;
CExtPopupMenuWnd::g_bMenuHighlightRarely = false;

Alexey Zbritsky Jan 31, 2005 - 10:27 AM

Can I specify basic commands for my popup menu in OnInitDialog() function?

Technical Support Jan 31, 2005 - 11:06 AM

The array with the basic command identifiers, which is passed as a parameter when calling g_CmdManager->SetBasicCommands() should contain only the identifiers of those commands that have been already registered in the Command Manager. So, if you have initialized the Command Profile and updated it from menus and toolbars, then you can mark some commands as basic. You can do this anywhere, not only in OnInitDialog().