AddFilesToProject
Adds to the project all the files listed in Templates.inf.
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
Tasks
Reference
Concepts
Customizing C++ Wizards with Common JScript Functions