The information in this article applies to:
SYMPTOMSIf you create a popup menu item and select its Grayed property in AppStudio, the menu item will appear Grayed in AppStudio and the GRAYED attribute will appear in the .RC file, but the menu item may not appear Grayed (disabled) when you run the application. The same behavior may appear for menus with the Inactive property. CAUSECFrameWnd has a member variable name m_bAutoMenuEnabled, which is described in the Class Library reference. The documentation states that this variable is set to TRUE by default, meaning that any menu item that has an ON_COMMAND handler but no corresponding ON_UPDATE_COMMAND_UI handler will be automatically enabled. This variable overrides any setting you may have selected in your resource file. RESOLUTIONIf you would like to change this behavior, either implement the ON_UPDATE_COMMAND_UI handler or set the value of m_bAutoMenuEnabled to FALSE in the derived CFrameWnd constructor. STATUSThis behavior is by design. REFERENCESThe Class Library Reference, documentation for ON_UPDATE_COMMAND_UI and CFrameWnd::m_bAutoMenuEnable. Additional query words: 1.00 1.50 2.50 2.51 2.52 2.00 2.10 2.20 3.00 3.10 3.20 4.00
Keywords : kbMFC KbUIDesign kbVC |
Last Reviewed: July 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |