How to display the
"Browse for Folder" dialog box
An example that shows how to display the "Browse for Folder" dialog and return a
user selected folder.
The zip file Includes translated definitions and documented source for the Browse dialog's
C structures:
BROWSEINFO
and the API calls:
- SHBrowseForFolder()
- SHGetPathFromIDList() and
- SHGetSpecialFolderLocation().
The demo also shows two of the many ways to call the
SHGetFileInfo API.
This is the 2nd update to the original version released to the public domain on 3/24/96.
The code has been made more readable by simplifying the procedures. Updates include
checkbox options for Browse dialog return types and demonstrates how to retrieve the
selected folder's icon from the return value.
For a free and full featured Browse dialog implementation wrapped into a Visual Basic
ActiveX server, visit the Common Controls Replacement Project (CCRP) site at http://www.mvps.org/ccrp.
Download browsdlg.zip (17kb) |