
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