Professional UI Solutions
Site Map   /  Register


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 » how to hide submenu item inside CExtMenuControlBar Collapse All
Subject Author Date
raphael verdier Jul 2, 2013 - 10:59 AM

We want to hide submenu item in our main CExtMenuControlBar.

if we override the function _UpdateMenuBar, we can hide a entire header, but we need sometimes to hide an subitem.

We don’t want to delete some items

how to do this ?

does we must override the g_nMsgPopupDrawItem or g_nMsgPrepareMenu ?


thanks for your help.


raphael verdier Jul 3, 2013 - 3:11 AM

Thanks for you answer but I don’t want to disable a menu item.

We want to hide an item. If I ovveride the g_nMsgPopupDrawIt, I have an empty row.

I think I must modify the extpopupmenuwnd or perhaps use a custom extpopupmenuwnd but is it possible with the CExtMenuControlBar ?


Art Wilkes Jul 2, 2013 - 11:49 AM

Here is what I would suggest.

Look at "CMenu::EnableMenuItem" in MSDN, The example toward the end of the doc is the code you need.

Then look at CExtMenuControlBar::GetMenu in

This will give you the menu pointer you need.

Hope this helps.