Share via


Adding ATL Support to Your MFC Project

If you have already created an MFC-based application, then you can add support for the Active Template Library (ATL) easily by running the Add ATL Support to MFC Project Wizard.

Note

ATL and MFC are not generally supported in the Express editions of Visual Studio.

Note

This support applies only to simple COM objects added to an MFC executable or DLL project. You can add other COM objects (including ActiveX controls) to MFC projects, but the objects might not operate as expected.

To add ATL support to your MFC project

  1. In Solution Explorer, right-click the project to which you want to add ATL support.

  2. On the shortcut menu, click Add, and then click Add Class.

  3. Select the Add ATL Support to MFC Project icon.

    Note

    This icon is located in the ATL folder in the Categories pane.

  4. When prompted, click Yes to add ATL support.

For more information about how adding ATL support changes your MFC project's code, see Details of ATL Support Added by the ATL Wizard

See Also

Tasks

Adding a Member Function (Visual C++)

Adding a Member Variable (Visual C++)

Overriding a Virtual Function (Visual C++)

Reference

Navigating the Class Structure (Visual C++)

Concepts

Adding a Class (Visual C++)

Adding Functionality with Code Wizards

Adding an MFC Message Handler