다음을 통해 공유


GetProjectFile

 

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

Returns the file name specified type.

Syntax

  
      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

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