Compartir a través de


AddATLSupportToProject

 

The latest version of this topic can be found at AddATLSupportToProject.

Adds ATL support to an MFC project.

Syntax

  
      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

Customizing C++ Wizards with Common JScript Functions
Creating a Custom Wizard
Designing a Wizard
CanAddATLClass
IsMFCProject
Introduction to ATL