Menu enabling in Dialog-based app 
Author Message
 Menu enabling in Dialog-based app

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.

Thanks in advance.

Mike Dembroge



Thu, 20 Jul 2000 03:00:00 GMT  
 Menu enabling in Dialog-based app

You cant get those in a Dialog based app. YOu need to handle
WM_INITPOPUP and do your stuff there... You can use undocumented
WM_KICKIDLE to update dialog controls using UpdateDialogControls () ..
but not menu stuff...

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.

> Thanks in advance.

> Mike Dembroge


--
Girish Bharadwaj [VC++/MVP]
http://members.tripod.com/~GBharadwaj/index.html



Fri, 21 Jul 2000 03:00:00 GMT  
 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



Sat, 22 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dialog based app menu

2. Dialog Based Apps - Menu & Windows :: MFC

3. Pop up menu in Dialog based App

4. trying to add menu to dialog based app

5. Newbie : Adding Menu Bar and Tool Bar to Dialog Based App

6. creating pop-up menus with dialog based apps gets assert error

7. Using a Menu in a Dialog-based app

8. menu in Dialog based app

9. Checking menu items in dialog based app.

10. Menus and dialog-based apps (again)

11. Updating menu items in dialog-based apps: Solution

12. Menus and dialog-based apps

 

 
Powered by phpBB® Forum Software