|
-
April 12th, 1999, 06:58 AM
#1
Menu Question
How can grey or hide a menu itemt hat has a sub menu at runtime? When a menu is set as pop-up (so that it has a submenu) the id combo box gets disabled.
-
April 12th, 1999, 07:38 AM
#2
Re: Menu Question
Use the MF_BYPOSITION flag when calling EnableMenuItem. See the following code fragment.
void CMainFrame::OnInitMenu(CMenu* pMenu)
{
CMDIFrameWnd::OnInitMenu(pMenu);
CMenu* pSubMenu=pMenu->GetSubMenu(2);
pSubMenu->EnableMenuItem(0,MF_BYPOSITION|MF_GRAYED);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|