Article ID: 179378 - View products that this article applies to.
By default, the SHBrowseForFolder API lets the user start at the desktop to browse the shell's namespace and pick a folder. Often, you may prefer that your application start the browse dialog box at a folder that the user is likely to want, such as the current working directory.
To set the browse dialog box's initial selection, the BROWSEINFO structure must contain a callback function. When the callback function is called with the message BFFM_INITIALIZED, it can in turn send a BFFM_SETSELECTION message to set the dialog box's selection to the desired path.
Following is some sample code that brings up the browse dialog box with the current directory selected. It also displays the path of the currently selected folder in the dialog box's status window.
Article ID: 179378 - Last Review: June 22, 2014 - Revision: 3.0
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Contact us for more help