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 » menu problem Collapse All
Subject Author Date
Artur Shingirei Dec 16, 2003 - 6:42 AM

Hello
I had problems with dynamic change of the menu.
I have a project based on dialogue.
I used your library for loading the menu and creation of the menu
Further I want to change a condition of some element of the menu

CExtMenuControlBar m_wndMenuBar;

BOOL CMainDlg:: OnInitDialog ()
{....
CMenu* pTopMenu = m_wndMenuBar. GetMenu ();
pTopMenu->ModifyMenu(0,MF_BYPOSITION,0,"Change");
...
unfortunately there is nothing change.

Sergiy Lavrynenko Dec 18, 2003 - 6:43 AM

Hi,


The m_wndMenuBar.GetMenu() method just returns the last menu that was removed from the top part of the frame window. You should not invoke it. To change text of any menu item on-the-fly, please implement the corresponding command update handler and invoke pCmdUI->SetText().