Z.K.
2006-10-12 14:55:04 UTC
How do I get access to the SDI menu? I want to be able to add or gray out a
menu item in code so that if I click a menu item it will gray out or if it
detects that it is in a certain mode on startup the menu will hide itself.
I tried using the code below, but it always crashes the program when I tried
to get the menu item count. I thought maybe the menu had not been created
yet, so I put the code in a button handler and it did the samething. What
am I doing wrong?
CMenu *myMenu;
myMenu = GetMenu();
//myMenu->EnableMenuItem(
UINT count = myMenu->GetMenuItemCount();
Z.K.
menu item in code so that if I click a menu item it will gray out or if it
detects that it is in a certain mode on startup the menu will hide itself.
I tried using the code below, but it always crashes the program when I tried
to get the menu item count. I thought maybe the menu had not been created
yet, so I put the code in a button handler and it did the samething. What
am I doing wrong?
CMenu *myMenu;
myMenu = GetMenu();
//myMenu->EnableMenuItem(
UINT count = myMenu->GetMenuItemCount();
Z.K.