CFileDialog::GetFileName
Visual Studio 2010
Call this function to retrieve the name of the filename entered in the dialog box.
CString GetFileName( ) const;
The name of the file includes both the prefix and the extension. For example, GetFileName will return "TEXT.DAT" for the file C:\FILES\TEXT.DAT.
If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, you should call GetStartPosition and GetNextPathName to retrieve a file pathname.