Article ID: 179378 - Last Review: November 21, 2006 - Revision: 1.3 How To Browse for Folders from the Current Directory
This article was previously published under Q179378 On This PageSUMMARY
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. MORE INFORMATION
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.
Sample Code | Other Resources Other Support Sites
CommunityArticle Translations |






















Back to the top