Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting OnUpdateCmdUI events to fire on time in a CDialog based application.

This isn't specifically NI related (though it is a problem I've run into while developping instrument control software with MStudio).

Evidently I've never tried to construct a Dialog based app before in MSVC++/MFC with menus. I have my main app window derived from CDialog, and I added a menu to it. The menu events fire fine, and the OnUpdateCmdUI events fire too. But here's the catch: the ON_UPDATE_COMMAND_UI events fire immediately before the item ON_COMMAND events (ie: not when the menu is first displayed, but after an command has been clicked).

How do I ensure that the menu is updated normally? You know, so check and radio settings actually appear (the way they do in frame windows)?


Thanks for any advice,

-Mike
mje1@u.washington.edu
0 Kudos
Message 1 of 2
(4,560 Views)
This is an MFC problem and is solved by John Wismar in it's article "Handling OnUpdate() processing for menu items" posted on Code Guru (http://www.codeguru.com/dialog/OnUpdate.shtml).

Hope will solve your problem,
Silvius
Silvius Iancu
0 Kudos
Message 2 of 2
(4,560 Views)