CFileDialog::GetFolderPath
Visual Studio 2008
Call this member function to retrieve the path of the currently open folder or directory for an Explorer-style Open or Save As common dialog box.
CString GetFolderPath( ) const;
A CString object containing the currently open folder or directory.
The dialog box must have been created with the OFN_EXPLORER style; otherwise, the method will fail with an assertion.
You can call this method only while the dialog box is being displayed. After the dialog box has been closed, this function will no longer work, and the method will fail with an assertion.