Link to home
Start Free TrialLog in
Avatar of huya
huya

asked on

Menu option disabling

How does one disable the menu options in an SDI from the View
ASKER CERTIFIED SOLUTION
Avatar of thresher_shark
thresher_shark

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thresher_shark
thresher_shark

To disable an item on a menu, use something like the following:

GetMenu ()->EnableMenuItem (ITEM_ON_MENU_YOU_WANT_DISABLED, MF_GRAYED);

You can put that code anywhere in your view class that you want it disabled.  Note that you can do a great deal of menu manipulation using the GetMenu ()->EnableMenuItem pair.  You might consider looking those functions up in the help as they can allow a great deal of flexibility.

If you have any further questions regarding this, please feel free to ask.  Thanks!