CFile::GetFileName

Call this member function to retrieve the name of a specified file. For example, when you call GetFileName to generate a message to the user about the file C:\Windows\Write\Myfile.wri, the filename, Myfile.wri, is returned. To return the entire path of the file, including the name, call GetFilePath. To return the title of the file (in this example, myfile), call GetFileTitle.

Syntax

virtual CString GetFileName( ) const;

At a Glance

Header File Afx.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CFile Overview, CFile Member Functions, File Service Classes, CFile::GetFilePath, CFile::GetFileTitle