Click to See Complete Forum and Search --> : Menus and such
Scythe
May 26th, 1999, 07:54 PM
I'm trying to create a program with a LARGE amount of menus(the kind that are on top of the screen, not pop-ups) that have checked menu choices. I created the menu-choice, clicked on the "Checked" box in the properties, but when I run the prog, the menu choices all start off checked and they will not change. I probably need some extra initialization code, I just don't know what it is. It's a dialog based program with (currently) 3 dialog boxes. If you could help, it'd be much appreciated.
Cmdr. Derek 'Scythe' Celsen
CO 1st covert squadron, Zeus.
Paul Burns
May 26th, 1999, 09:36 PM
to change a menu item's state, e.g. from checked to not-checked, you need a command update handler -- run Classwizard and select a menu item command id and add a handler for UPDATE_COMMAND_UI. then in your handler you decide whether you want to display it checked or not using code like this...
if (<show checked>)
pCmdUI->SetCheck(1);
else
pCmdUI->SetCheck(0);
Scythe
May 30th, 1999, 11:10 AM
Thanks, but I"m not quite sure about some of the things I do with that. ie: There's parts of it I have to replace with my own variables, but what are they? THanks
Cmdr. Derek 'Scythe' Celsen
CO 1st covert squadron, Zeus.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.