Using a Menu in a Dialog-based app 
Author Message
 Using a Menu in a Dialog-based app

I have a dialog-based MFC application. By that I mean that when I
generated it through the AppWizard I selected Dialog-based as the type
of application as opposed to SDI or MDI. Now I would like to add a menu
to it (although it looks kind of wierd if I do). The dialog comes up
fine with the menu showing. However, even if I make a menu class and use
the ClassWizard to edit the code for the menu events, I can't find the
place in the dialog code to declare an instance of the menu.

Is it possible to have a dialog-based app with a menu, and, if it is,
where and how do I declare the menu so that I make the menu items act on
the dialog items? Or do I have to re-write the app as an SDI that calls
the dialog from the menu (which I have done before).

Mike Coldewey



Mon, 17 Jul 2000 03:00:00 GMT  
 Using a Menu in a Dialog-based app

Build your menu by inserting a menu item and editing it to what you want in
the resource editor.  then again from the resource editor go to the dialog
box resource, right click on it, select properties, and set the menu to the
id you gave it.  That's all you have to do--of course you have to add
message handlers for each of the messages in the dialog class.

Quote:

> I have a dialog-based MFC application. By that I mean that when I
> generated it through the AppWizard I selected Dialog-based as the type
> of application as opposed to SDI or MDI. Now I would like to add a menu
> to it (although it looks kind of wierd if I do). The dialog comes up
> fine with the menu showing. However, even if I make a menu class and use
> the ClassWizard to edit the code for the menu events, I can't find the
> place in the dialog code to declare an instance of the menu.

> Is it possible to have a dialog-based app with a menu, and, if it is,
> where and how do I declare the menu so that I make the menu items act on
> the dialog items? Or do I have to re-write the app as an SDI that calls
> the dialog from the menu (which I have done before).

> Mike Coldewey



Mon, 17 Jul 2000 03:00:00 GMT  
 
 [ 2 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. Menu enabling in 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