Link to home
Start Free TrialLog in
Avatar of JP_Goblet
JP_Goblet

asked on

how to enable/disable menu items with ON_UPDATE_COMMAND_UI when menu is in a dialogbox ?

I have inserted a menu in a dialog box, added some ON_UPDATE_COMMAND_UI in the dialogbox messagemap, wrote the associated CCmdUI handlers, so that some menu items are disabled/enabled depending of the application state.
My CCmdUI handlers are not called, the result is that all menu items stay enabled.
I known that in an standard document/view application, the mainframe calls these CCmdUI handlers during idle time. How to make it work in a dialogbox application ?

JPG
ASKER CERTIFIED SOLUTION
Avatar of akalmani
akalmani

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 JP_Goblet
JP_Goblet

ASKER

Thanks to akalmani for directing me to the right Microsoft page.

"This behavior is by design." said Bill on that page. Amen.
Avatar of AndyAinscow
You could always do an SDI based app using a form based view.  There one has the menu/toolbar support automatically.