共用方式為


CFile::GetFileTitle

virtual CString GetFileTitle( ) const;

Return Value

The title of the specified file.

Remarks

Call this member function to retrieve the file title for a specified file. For example, when you call GetFileTitle to generate a message to the user about the file c:\windows\write\myfile.wri, the file title (myfile) is returned.

Note   In Windows 95, the file title typically does not include the extention. For a explanation of this, see in the Win32 documentation.

To return the entire path of the file, including the name, call GetFilePath. To return just the name of the file (myfile.wri), call GetFileName.

Example

See the example for GetFileName.

CFile OverviewClass MembersHierarchy Chart

See Also   CFile::GetFileName, CFile::GetFilePath,