CFile::GetFileTitle

Call this member function to retrieve the file title (the display name) for the file.

virtual CString GetFileTitle( ) const;

Return Value

The title of the underlying file.

Remarks

This method calls GetFileTitle to retrieve the title of the file. If successful, the method returns the string that the system would use to display the file name to the user. Otherwise, the method calls PathFindFileName to retrieve the file name (including the file extension) of the underlying file. Therefore, the file extension will not always be included in the returned file title string. For more information, see GetFileTitle and PathFindFileName in the Windows SDK.

To return the entire path of the file, including the name, call GetFilePath. To return just the name of the file, call GetFileName.

Example

See the example for GetFileName.

Requirements

Header: afx.h

See Also

Reference

CFile Class

Hierarchy Chart

CFile::GetFileName

CFile::GetFilePath

GetFileTitle

PathFindFileName