CFileDialog::GetFileTitle

Call this function to retrieve the title of the file entered in the dialog box.

CString GetFileTitle( ) const;

Return Value

The title of the file.

Remarks

The title of the file includes only its prefix, without the path or the extension. For example, GetFileTitle will return "TEXT" for the file C:\FILES\TEXT.DAT.

If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, this string contains a sequence of null-terminated strings, with the first string being the directory path of the file group selected, followed by the names of all files selected by the user. For this reason, use the GetStartPosition and GetNextPathName member functions to retrieve the next file name in the list.

Example

See the example for CFileDialog::DoModal.

Requirements

Header: afxdlgs.h

See Also

Reference

CFileDialog Class

Hierarchy Chart

CFileDialog::GetPathName

CFileDialog::GetFileName

CFileDialog::GetFileExt

GetFileTitle

Other Resources

CFileDialog Members