Поделиться через


CFileFind::GetFileTitle

Call this member function to get the title of the found file.

virtual CString GetFileTitle( ) const;

Возвращаемое значение

The title of the file.

Заметки

You must call FindNextFile at least once before calling GetFileTitle.

GetFileTitle is one of three CFileFind member functions that return some form of the file name. The following list describes the three and how they vary:

  • GetFileName returns the file name, including the extension. For example, calling GetFileName to generate a user message about the file c:\myhtml\myfile.txt returns the file name myfile.txt.

  • GetFilePath returns the entire path for the file. For example, calling GetFilePath to generate a user message about the file c:\myhtml\myfile.txt returns the file path c:\myhtml\myfile.txt.

  • GetFileTitle returns the file name, excluding the file extension. For example, calling GetFileTitle to generate a user message about the file c:\myhtml\myfile.txt returns the file title myfile.

Пример

See the example for CFileFind::GetFileName.

Требования

Header: afx.h

См. также

Основные понятия

CFileFind Class

CFileFind Members

Hierarchy Chart

CFileFind::FindFile