다음을 통해 공유


JScript Functions for C++ Wizards

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at JScript Functions for C++ Wizards.

AddATLSupportToProject](../Topic/AddATLSupportToProject.md)|Adds ATL support to an MFC project.|
|AddCoclassFromFile|Renders and inserts into the project's .idl file a template file that contains a coclass.|
|AddCommonConfig|Adds the default configurations to the project.|
|AddFilesToProject|Adds all the files to the project based on the list in the file Templates.inf.|
|AddInterfaceFromFile|Renders and inserts into the project's IDL file a template file that contains an interface.|
|CanAddATLClass|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.|
|CanAddClass|The wizard calls this function when the parameter PREPROCESS_FUNCTION is in the project control's .vsz file.

It verifies if the Visual C++ Code Model object is available. If the code model is not available, the function reports an error and returns false.|
|CanAddMFCClass|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 MFC 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 object is available. If the code model is not available, the function reports an error and returns false.|
|CanAddNonAttributed|Indicates whether the project supports both attributed and nonattributed ATL objects.|
|CanUseFileName|Checks if a file exists. If so, the wizard prompts the user to merge the code to be added to the existing file.|
|ConvertProjectToAttributed|Converts an ATL project to attributed.|
|CreateInfFile|Creates the Templates.inf file.|
|CreateProject|Creates a C++ project.|
|CreateSafeName|Generates a C++ friendly name.|
|DeleteFile|Deletes the specified file.|
|DoesIncludeExist|Indicates whether a #include statement exists in a file.|
|GetCodeForDllCanUnloadNow|Retrieves code needed to unload the DLL.|
|GetCodeForDllGetClassObject|Retrieves the code for the DLL class object.|
|GetCodeForDllRegisterServer|Retrieves the code to register a server.|
|GetCodeForDllUnregisterServer|Retrieves the code to unregister a server.|
|GetCodeForExitInstance|Helper function to get the text for ExitInstance.|
|GetCodeForInitInstance|Helper function to get the text for InitInstance.|
|GetExportPragmas|Retrieves the pragmas for exporting functions.|
|GetInterfaceClasses|Returns the VCCodeClass object associated with an interface.|
|GetInterfaceType|Returns the type of interface (for example, custom, dual, dispinterface, oleautomation).|
|GetMaxID|Returns the highest dispid from members of this interface and all of its bases.|
|GetMemberfunction|Returns a function object based on the given name.|
|GetProjectFile|Returns the file name of per-project type of files (.rc, .idl, and so on).|
|GetProjectPath|Returns the project's directory path.|
|GetRuntimeErrorDesc|Returns a description for the type of exception.|
|GetUniqueFileName|Returns a unique file name.|
|IncludeCodeElementDeclaration|Adds the include statement to strInFile, including the header where strCodeElemName is implemented, if such a header found is in the project.|
|InsertIntoFunction|Helper function called in AddATLSupportToProject to insert code into InitInstance.|
|IsATLProject|Indicates whether project is ATL based.|
|IsAttributedProject|Indicates whether a project is attributed.|
|IsMFCProject|Checks if a project is MFC based.|
|LineBeginsWith|Helper function called in InsertIntoFunction to determine if a line begins with a particular string|
|OffsetToLineNumber|Finds the line number for a given position in a function body.|
|OnWizFinish|Called from the wizard HTML script when the user clicks Finish. Calls the wizard control's Finish method.|
|RenderAddTemplate|Renders a template file and optionally adds it to the project.|
|SetCommonPchSettings|Sets up the precompiled header for the project.|
|SetErrorInfo|Provides error information.|
|SetFilters|Adds source, include, and resource filters for project folders.|
|SetMergeProxySymbol|Called by the wizard to add the _MERGE_PROXYSTUB symbol if needed.|
|SetNoPchSettings|Sets up the project configuration properties when no precompiled header is used.|

See Also

Customizing C++ Wizards with Common JScript Functions
Creating a Custom Wizard
Designing a Wizard