Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Adding Objects and Controls to an ATL Project
Adding Objects and Controls to an ATL Project
ATL projects, adding objects
wizards [C++], ATL projects
ATL projects, adding controls
controls [ATL], adding to projects
objects [C++], adding to ATL projects
ATL Control Wizard

Adding Objects and Controls to an ATL Project

[!NOTE] The ATL COM+ 1.0 Component Wizard, ATL OLE DB Consumer wizard, and ATL Active Server Page Component wizard are not available in Visual Studio 2019 and later.

You can use one of the ATL code wizards to add an object or a control to your ATL- or MFC-based projects. For each COM object or control you add, the wizard generates .cpp and .h files, as well as an .rgs file for script-based registry support. The following ATL code wizards are available in Visual Studio:

[!NOTE] Before adding an ATL object to your project, you should review the details and requirements for the object in its related Help topics.

To add an object or a control using the ATL Control Wizard

  1. In Solution Explorer, right-click the project node and click Add from the shortcut menu. Click Add Class.

    The Add Class dialog box appears.

  2. With the ATL folder selected in the Categories pane, select an object to insert from the Templates pane. Click Open. The code wizard for the selected object appears.

    [!NOTE] If you want to add an ATL object to an MFC project, you must add ATL support to the existing project. You can do this by following the instructions in Adding ATL Support to Your MFC Project.

    Alternately, if you attempt to add an ATL object to your MFC project without previously adding ATL support, Visual Studio prompts you to specify whether you want ATL support added to your project. Click Yes to add ATL support to the project and open the selected ATL wizard.

See also

ATL Project Wizard
C++ project types in Visual Studio
Fundamentals of ATL COM Objects
Programming with ATL and C Run-Time Code
Default ATL Project Configurations