I know there are functions that make common dialog boxes that let you have "Save", "Open", "Choose Font", "Choose Color", etc. But is there one that allows the user to choose a directory (something like the attached picture)?
Thanks
I know there are functions that make common dialog boxes that let you have "Save", "Open", "Choose Font", "Choose Color", etc. But is there one that allows the user to choose a directory (something like the attached picture)?
Thanks
SHBrowseForFolder.
There's a couple of examples in this thread.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
That is correct.
You need to set up a structure of type BROWSEINFO to set up the dialog box. and set up a pointer to a structure of type ITEMIDLIST to get the return value of SHBrowseForFolder. You can then use a function called SHGetPathFromIDList, which takes your ITEMIDLIST structure as it's first parameter and a char array as it's second parameter. It will then copy the path inot your char array.
Compiler == Visual C++ 6.0"Come Out Fighting."