To do this, you need to specify a callback function in the
lpfn
member of the
BROWSEINFO
structure. Set the initial folder to the desktop (or the highest level you want allowed) at first. Once the dialog has been initialised, you can send a
BFFM_SETSELECTION
message to the dialog with the folder you want selected in the LPARAM. See
BFFCALLBACK function pointer (Windows)[
^] for detailed info on how to do all this.