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?
CFileDialog
You can't do it with CFileDialog. Either you will use SHBrowseForFolder Function or a wrapper for it, like CFolderDialog - Selecting Folders.