mfcvisual-c++

CFileDialog :: Browse folders


When I try to instantiate a CFileDialog object it shows both the folders and files. How do you create a CFileDialog that browses for folders alone?


Solution

  • You can't do it with CFileDialog.

    Either you will use SHBrowseForFolder Function or a wrapper for it,
    like CFolderDialog - Selecting Folders.