Customize the dialog and call it.
2025-10-29
Written by: xiaobin
Select the dialog form, then right-click and select “properties”:
Drag the Win Control from the Toolbox to the dialog window:
In the main form’s button event.
#include "ConfigDlg.h"
CConfigDlg* dlg = new CConfigDlg(this);
dlg->DoModal();
The primary technique used to create a dialog is to derive a class from CDialog. To enhance it, Microsoft created a new class named CDialogEx. This class is derived from CDialog and it added only two characteristics: a color background and a picture background.