How to browse for and select a folder/directory name ?


  • Am using C++ with MFC. I need the ability to select a folder name, not a file name. Is there a way I can use CFileDialog (or some other class) to do this? I know about CFileDialog::GetFolderPath() but you still have to select a specific file within the folder. I just want to see and select a folder name without having to click select a file within it. There's source code for a CDirDialog class floating around but is not part of the MFC classes that are installed with Visual Studio. Tried adding CDirDialog source to my project but it would not build. A waste of time.
    • Edited by RJH57 Tuesday, September 06, 2016 10:43 AM
    Tuesday, September 06, 2016 10:43 AM


All replies