does anybody know how to create a dialog, similar to File Open or Save As dialogs, that would enable me to select a directory? I need a dialog where the user could choose a directory into which the output files of the application will be saved. I suppose such dialog should be possible to create by setting some parameters in the CFileDialog::CFileDialog() constructor. Anyway, I tried searching the MSDN and haven't found anything yet.
if (::SHGetPathFromIDList(lpItemIDList, szBuffer))
// At this point, szBuffer contains the path
// the user chose.
if (szBuffer == '\0')
// SHGetPathFromIDList failed, or
// SHBrowseForFolder failed.
// We have a path in szBuffer!
// Return it.
strResult = szBuffer;
// The thing referred to by lpItemIDList
// might not have been a file system object.
// For whatever reason, SHGetPathFromIDList
// didn't work!
return strResult; // strResult is empty
nd if u need documentation search for "browse for folder non-com way"
string in MSDN library. It will give u watever u require.