description | title | ms.date | helpviewer_keywords | ms.assetid | |||||
---|---|---|---|---|---|---|---|---|---|
Learn more about: Creating Your Dialog Class |
Creating Your Dialog Class |
09/06/2019 |
|
d5321741-da41-47a8-bb1c-6a0e8b28c4c1 |
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.
Creating a Dialog Class with Code Wizards
Working with Dialog Boxes in MFC