|
-
July 19th, 1999, 06:40 AM
#1
Disabling the Menu Bar
Hi, does anyone know how to disable the entire menu bar( File, Edit, View...etc) ? Each menu doesn't have a ID, so I wasn't sure how to do this. I know how to do each of the contents of the menus, but I just thought it would be easier to grey out the entire thing, rather than each one separately. Thanks.
-
July 19th, 1999, 06:50 AM
#2
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
-
July 19th, 1999, 06:57 AM
#3
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.
-
July 19th, 1999, 07:08 AM
#4
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
-
July 19th, 1999, 07:22 AM
#5
Re: Disabling the Menu Bar
Thank you very much, yes this works just how I wanted to 
-
July 19th, 1999, 07:26 AM
#6
One other thing....
Is there a way to get this to update right away? UpdataWnd or something... because it only grays out when the mouse is moved over it...
-
July 19th, 1999, 07:37 AM
#7
Re: One other thing....
Try to send a message to this item (a WM_COMMAND).
It works?
Same Faby Pantera
-
July 19th, 1999, 07:50 AM
#8
Re: One other thing....
Yes, thank you once again. You have been a big help.
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
|