Share via


CanAddATLClass

Called by the wizard to verify that the user can add an ATL class to the project.

function CanAddATLClass( 
   oProj, 
   oObject  
);

Parameters

  • oProj
    The selected project.

  • oObject
    The selected object. In this case, the current project.

Return Value

true if the class can be added; false if the user calls the function for a project that is not an ATL project and does not have ATL support.

Remarks

Called by the wizard to verify if the project is compatible with the code wizard that is about to be run (in other words, it can accept an ATL class).

The wizard calls this function when the parameter PREPROCESS_FUNCTION is in the project control's .vsz file and checks if the Visual C++ Code Model is available. If the code model is not available, the function reports an error and returns false.

Example

// Determine if an ATL class can be added to the project
if (CanAddATLClass(selProj, selObj))
{
   return true;
}

See Also

Tasks

Creating a Custom Wizard

Reference

CanAddClass

IsMFCProject

CanAddMFCClass

Concepts

Customizing C++ Wizards with Common JScript Functions

Designing a Wizard

Other Resources

JScript Functions for C++ Wizards