Bagikan melalui


AddATLSupportToProject

Adds ATL support to an MFC project.

function AddATLSupportToProject( 
   oProj 
);

Parameters

  • oProj
    The selected project.

Return Value

true if ATL support was successfully added to the MFC project.

Remarks

Use this function to add ATL support to an MFC project created by the wizard.

The wizard displays a message box to confirm adding ATL support to the MFC project. Upon confirmation, the wizard checks for existing support and adds all the necessary GUIDs, templates, headers, and additional functionality so that the MFC project created by the wizard supports ATL.

Example

var oCM = selProj.CodeModel;
var L_TRANSACTION_Text = "Add ATL Support To Project";
oCM.StartTransaction(L_TRANSACTION_Text);
var bRet = AddATLSupportToProject(selProj);
if (bRet)
   oCM.CommitTransaction();
else
   oCM.AbortTransaction();
return bRet;

See Also

Tasks

Creating a Custom Wizard

Concepts

Customizing C++ Wizards with Common JScript Functions

Designing a Wizard

Reference

CanAddATLClass

IsMFCProject

Introduction to ATL