
Disabling main menu items
Quote:
>but there is no
>ID number for the top level menu item, and I can't get Class Wiz to
>create an OnUpdate method for it.
You use EnableMenuItem and reference menu bar items by _position_.
e.g.
CMenu * pMenu = GetMenu ();
if (pMenu)
pMenu->EnableMenuItem (0, MF_GRAYED|MF_BYPOSITION);
DrawMenubar();
Will gray out the leftmost item on your window's menubar.
--
Bob Moore [WinSDK MVP]
http://www.mooremvp.freeserve.co.uk/
(this is a non-commercial site and does not accept advertising)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not reply via email unless specifically requested to do so.
Unsolicited email is NOT welcome and will go unanswered.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~