We help IT Professionals succeed at work.

How can I add Menu in the dialog box in MFC 2008

gamjaradio asked
I'm using MFC 2008..

please give me advice of how to add Menu into dialog box
Watch Question

One way is to create your own dialog box, instead of using a canned form. Just create a form, add the same buttons and controls as the canned dialog box, and also add whatever menues or extra controls you want. For example, assume the Form is MyDialogForm and the text box is txtAnswer and you have an OK button. Let's also assume you have a Global (AKA Public) string variable in your program called MyAnswer. The code in the OK button could be
MyAnswer = txtAnswer
Unload MyDialogForm
Set MyDialogForm = Nothing
A Cancel button on the form would just have the code

MyAnswer = ""
Unload MyDialogForm
Set MyDialogForm = Nothing
The code to display the dialog box is just
Set MyDialogForm.Show


I need MFC