开发者

Menu Command Update Handlers in Dialog Boxes

I have a dialog-based MFC application. My dialog box has a menu and I'm using the technique described here to enable menu accelerators in the dialog box.

This works fine but I can't seem to find any way to impl开发者_JS百科ement menu command update handlers. Or, rather, I've implemented update handlers but can't seem to find a good way to get MFC to call them.

Searching the web, I've found functions like UpdateDialogControls() to implement command update handlers for dialog child controls. But I want to do this for commands in a dialog box menu.

Any suggestions?


I'm not much into MFC, I worked with plain win32 but this looks like what you need The ON_UPDATE_COMMAND_UI Macro. And if you look on the left navigation menu you can find also "When Update Handlers Are Called" topic.

And make sure everywhere you're passing handle to window you're actually passing handle to dialog box with menu (e.g. listing 3 in tutorial).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜