【问】

Is it possible to put a menu in a dialog based application? How?

【答】


Yes, it is possible to add menu to the dialog based applications. You can create the menu as a resource and attach the same to the dialog.

If you open the properties for dialog, you can see a Menu as a property for which you can assign an existing Menu ID.

Steps:


  • Right click on Resource View and insert a new Menu. (Menu with some ID-- lets say IDR_MENU1 -- is created)
  • Configure the menu to add required items in menu and provide the ID, Caption to the menu items.
  • Right click on Dialog and open Properties...
  • From Menu Combobox, select the ID of the required menu ( here IDR_MENU1)