Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.39 KB

creating-your-dialog-class.md

File metadata and controls

29 lines (19 loc) · 1.39 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Creating Your Dialog Class
Creating Your Dialog Class
09/06/2019
dialog boxes [MFC], creating
MFC dialog boxes [MFC], creating
files [MFC], creating
dialog classes [MFC], Add Class Wizard
dialog classes [MFC], creating
d5321741-da41-47a8-bb1c-6a0e8b28c4c1

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