AddFilesToProject

 

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 AddFilesToProject.

Adds to the project all the files listed in Templates.inf.

Syntax

  
      function AddFilesToProject(   
   oProj,   
   strProjectName,   
   InfFile    
);  

Parameters

oProj
The selected project.

strProjectName
The name of the project.

InfFile
The Templates.inf file object. This file contains a list of file names that the wizard creates on completion.

Remarks

Call this function to add to the project all of the files listed in Templates.inf. Using this function, you can add template files, resource files, or help files.

Example

// Assign the project path and project name.  
var strProjectPath = wizard.FindSymbol("PROJECT_PATH");  
var strProjectName = wizard.FindSymbol("PROJECT_NAME");  
  
// Create the Visual C++ project and call it "MyProj"  
selProj = CreateProject(strProjectName, strProjectPath);  
selProj.Object.Keyword = "MyProj";  
  
// Add common and specific configurations to the project.  
AddCommonConfig(selProj, strProjectName);  
AddSpecificConfig(selProj, strProjectName);  
  
// Set the project filters  
SetFilters(selProj);  
  
// Create the project's Templates.inf file   
var InfFile = CreateInfFile();  
  
// Add the files in Templates.inf to the project.  
AddFilesToProject(selProj, strProjectName, InfFile);  

See Also

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