Re: Disabling the Menu Bar
CMenu* pSecond = pMenu->GetSubMenu(1);
pSecond->EnableMenuItem(1, MF_BYPOSITION|MF_GRAYED);
let menkow if this helps you.
Best regards,
Faby
Re: Disabling the Menu Bar
What is pMenu a member of? Cause the way I am trying to do this, is when the user clicks on a certain menu option under View, I want to grey out each of the other menu options, and then re-enable them when the user clicks it again.
Re: Disabling the Menu Bar
It should be like this one:
CMenu* pMenu = AfxGetMainWnd()->GetMenu();
pMenu->EnableMenuItem(....
Add this code when you want to grayed it.
It works?
Regards,
Faby
Re: Disabling the Menu Bar
Thank you very much, yes this works just how I wanted to :)