Advertisement

06.20.2008 at 02:17PM PDT, ID: 23503686
[x]
Attachment Details

Disabling a menu item on a dialog menu

Asked by clintonJ in Microsoft Visual C++.Net, Windows MFC Programming, Microsoft Visual C++

Tags: Visual C++ 6.0

I have an VC 6.0 app.  In design time, I created a menu on the main dialog.  The resource ID is IDR_MAINFRAME.  Like many windows programs, this menu has three menus.  From left to right, the menus are "File", "View", and "Help".  On my "View" menu, I want to be able to enable/disable the fourth menu item, during runtime, depending on the user's input.

I've tried processing the ON_UPDATE_COMMAND_UI message for the menu item, but my message handler function is never getting called.  If I use the resource ID of the first menu item in the "View" menu,  in connection with ON_UPDATE_COMMAND_UI.  In this case, my message handler function DOES get called.  But then how do I reference the fourth menu item?

Thanks ahead of time.Start Free Trial
[+][-]06.20.2008 at 02:50PM PDT, ID: 21835191

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C++.Net, Windows MFC Programming, Microsoft Visual C++
Tags: Visual C++ 6.0
Sign Up Now!
Solution Provided By: jaime_olivares
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628