
Menu enabling in Dialog-based app
On Sun, 01 Feb 1998 22:51:16 -0800, "Mike Dembroge"
Quote:
>How do I implement menu enabling in a dialog-based app? I have a
>dialog-based app, and need my CDialog derived main window to do menu
>enabling. ( I have a menu on the dialog.)
>In the apps' InitInstance() method, I create the dialog as a modeless
>dialog, and everything is working fine, except that neither the app nor the
>dialog is getting notified of ON_COMMAND_UI command messages.
>I've looked on MSDN, but none of the examples of Dialog-based apps have a
>menu on them, so this isn't an issue.
You need to implement OnInitMenuPopup in your dialog class, and you
can mostly copy CFrameWnd's implementation. As far as I can tell,
MFC should've implemented this in CWnd, so you wouldn't have to do this.
--
Doug Harrison