Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MY MENU ITEMS ARE DISABLED WHEN BUILT AND RUN EVERYTIME

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
if i make a new menu with a ersource editor in visual c++ 6.0, when the program is run, the menu works but when it displays the menu items, they are all disabled......can u help me or tell me how to fix this??
 
hi,
use mfc classwizard,open message maps tab ,select the project,class name and Object id (menu item id), messages:command , press add function button to enable it.
Add your message-handling function, so you can key-in some code within the function (=responce of the menu item).
 
Get some books, i recommend:
Teach yourself Visual C++ in 21 days by Gurewich+Gurewich
Programming with MFC for Windows by Jeff Prosise
 
CFrameWnd::m_bAutoMenuEnable
Remarks

When this data member is enabled (which is the default), menu items that do not have ON_UPDATE_COMMAND_UI or ON_COMMAND handlers will be automatically disabled when the user pulls down a menu.

Menu items that have an ON_COMMAND handler but no ON_UPDATE_COMMAND_UI handler will be automatically enabled.

When this data member is set, menu items are automatically enabled in the same way that toolbar buttons are enabled.

This data member simplifies the implementation of optional commands based on the current selection and reduces the need for an application to write ON_UPDATE_COMMAND_UI handlers for enabling and disabling menu items.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top