Creating Your Dialog Class

For each dialog box in your program, create a new dialog class to work with the dialog resource.

Adding a Class explains how to create a new dialog class. When you create a dialog class with the Class Wizard, it writes the following items in the .h and .cpp files you specify:

In the .h file:

  • A class declaration for the dialog class. The class is derived from CDialog.

In the .cpp file:

  • A message map for the class.

  • A standard constructor for the dialog box.

  • An override of the DoDataExchange member function. Edit this function. It is used for dialog data exchange and validation capabilities as described later in Dialog data exchange and validation.

See also

Creating a Dialog Class with Code Wizards
Working with Dialog Boxes in MFC