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 » About CExtPopupMenuWnd Collapse All
Subject Author Date
denny Jun 24, 2002 - 9:39 AM

I create a CExtPopupMenuWnd in child window,
but i can’t disable the Item of CExtPopupMenuWnd .
why?





Sergiy Lavrynenko Jun 27, 2002 - 12:24 PM

To perform the following operations with menu items or toolbar items:
- enable or disable
- set checkmark
- set radiomark
you should use the ON_UPDATE_COMMAND_UI standard MFC’s method.

First, add this macro to the message map of the window that recieves menu commands:

ON_UPDATE_COMMAND_UI( ID_MY_MENU_COMMAND, OnUpdateMyMenuCommandHandler )

Then implement this handler method:

void CMyWnd::OnUpdateMyMenuCommandHandler( CCmdUI * pCmdUI )
{
// call any of these:
pCmdUI->Enable( TRUE );
pCmdUI->Enable( FALSE );
pCmdUI->SetCheck( TRUE );
pCmdUI->SetCheck( FALSE );
pCmdUI->SetRadio( TRUE );
pCmdUI->SetRadio( FALSE );
}

Buba Jun 25, 2002 - 5:20 AM

See below " and again ... :) Buba 2002-06-19 00:38:48"