Monday, March 15, 2010

Cannot disable menu item in MFC

If you encounter a problem where a menu item always appear as enabled, even if you disable it in the resource editor, then this is caused by the 'auto enable menu item' behavior of mfc. One way around this is simple to set the member variable responsible for this in your frame to false, which can be done in the OnCreate method for example.

m_bAutoMenuEnable = 0;



No comments:

Post a Comment