Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to show Folder Browser like CFileDialog. How can I do this?
I'm working with Visual Studio 2010, MFC.

Thank you.
gto
Posted
Updated 7-Apr-11 6:17am
v2
Comments
Nuri Ismail 7-Apr-11 12:18pm    
Edited for grammar, readability and proper tags.

1 solution

All you need is SHBrowseForFolder[^] API.
There are lots of examples on using this function for displaying Browse For Folder Dialog - check out this CP article[^] for direct usage of the function.

You can also find CP articles that provide helper classes built around SHBrowseForFolder:
- CFolderDialog - Selecting Folders[^]
- XBrowseForFolder - Wrapper for SHBrowseForFolder[^]

If you want to go further and want a folder selection dialog, similar to CFileDialog have a look at this[^] excellent CodeProject article.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900