Adding an ATL Dialog Box


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Adding an ATL Dialog Box.

To add an ATL dialog to your project, your project must be either an ATL project or an MFC project that includes ATL support. You can use the ATL Project Wizard to create an ATL application, or add an ATL object to your MFC application to implement ATL support for an MFC application.

By default, the ATL Dialog Wizard implements a dialog box derived from CAxDialogImpl. This class includes support for hosting ActiveX and Windows controls. If you do not want the overhead of ActiveX control support, once the wizard has generated your code, replace all instances of CAxDialogImpl with either CSimpleDialog or CDialogImpl as your base class.

System_CAPS_ICON_note.jpg Note

CSimpleDialog creates only modal dialog boxes that support only Windows common controls. CDialogImpl creates either modal or modeless dialog boxes.

To add an ATL dialog resource to your project

  1. Create an ATL project using the ATL Project Wizard.

  2. From Class View, right-click the project name and click Add from the shortcut menu. Click Add Class.

  3. In the Templates pane of the Add Class dialog box, click ATL Dialog. Click Open to display the ATL Dialog Wizard.

For more information, see Implementing a Dialog Box.

Adding a Class
Window Classes
Message Maps