How to implement custom dialog box class in MFC

In MFC programming, we often encounter the need to use a dialog box of our own, so how to achieve it? then, let's watch it together:

1. Open ResourceView——>Right click Dialog——>Insert Dialog, give it IDD_DIALOG1

2. Click Insert on the menu bar -> Class

3. Select the class type as MFC Class in the single-out dialog box of the new class, the Name is arbitrary, and the Base calss select CDialog, because this is the parent class of all dialog boxes.

Then we can see the new dialog class mydialog we created in Class View

Guess you like

Origin blog.csdn.net/qq_25036849/article/details/108816666