GetProjectFile

Returns the file name specified type.

function GetProjectFile( 
   oProj, 
   strType, 
   bFullPath, 
   bMFC  
);

Parameters

  • oProj
    The selected project.

  • strType
    The type of file to retrieve, such as STDAFX, RC, IDL, CPP, H, ODL, or DEF.

  • bFullPath
    Flag indicating whether to return the full path name.

  • bMFC
    Indicates if the project is an MFC-based project. If strType is .cpp or .h, it is considered MFC based. If not, the project is assumed to be ATL based.

Return Value

The file name of the per-project type of files.

Remarks

Call this function to get the file name of the specified type in the specified project.

Example

// The selected MFC project's CPP file is retrieved and 
// assigned to strFileName.
var strFileName = GetProjectFile(selProj, "CPP", false, true);

See Also

Tasks

Creating a Custom Wizard

Concepts

Customizing C++ Wizards with Common JScript Functions

Designing a Wizard

Reference

GetProjectPath

GetUniqueFileName

Other Resources

JScript Functions for C++ Wizards