The pre-Vista version of my application used SHBrowseForFolder to let a user pick a folder for something. Sometimes when picking a folder, it is nice to be able to see the files that are in the folders, even though you have to ultimately select a folder rather than a file. SHBrowseForFolder demonstrated awareness of this fact by offering the BIF_BROWSEINCLUDEFILES option.
As we move to Vista, the window that SHBrowseForFolder brings up looks rather . . . dated. But IFileOpenDialog has come to the rescue with its FOS_PICKFOLDERS option, giving you a very attractive Vista-looking dialog for picking a folder. Except that the knowledge of the value of being able to see files when picking folders has been lost -- IFileOpenDialog with FOS_PICKFOLDERS offers no equivalent of BIF_BROWSEINCLUDEFILES that I can find. So do I offer my users consistent Vista Explorer look-and-feel, or do I present a rather dated-looking dialog that has a key feature they have gotten used to?
Have I missed something? If not, Shell team, can you make IFileOpenDialog with FOS_PICKFOLDERS truly deprecate SHBrowseForFolder by adding the ability to show files?
I'm Imagining how users might get a bit confused when, in an IFileDialog with the FOS_PICKFOLDERS flag set, they right click for the context menu, select New->Text File, only to see the file dissapear, when, unbeknownst to them, it was actually CREATED. Imagine them not understanding what is really going on, and trying it several times to no avail. Then image the railing the developer is going to receive when said user goes to that folder in windows explorer, only to find it filled with New Text Document.txt, New Text Document (2).txt, New Text Document (3).txt, New Text Document (4).txt, New Text Document (5).txt ... etc.
IMHO, the FOS_PICKFOLDERS is useless, unless we either allow the files to be shown, or disable the 'New' item in the context menu for anything but folders. I'll either have to roll my own, or develop some kind of hook to intercept the dialog messages.
... And to think I was squealing 'lame!' every time a modern app used the clunky old SHBrowseForFolder on Vista or 7. heh ;)
- Edited by madhtr1111 Thursday, January 19, 2012 12:05 AM typos
I too have stumbled on this thread searching for how to provide a folder selection dialog that also shows relevant files under Vista when building with VS2010. I've used a 'customised' CFileDialog in the past but this will no longer work without a complete revamp.
I was really pleased to find Microsoft now provided a CFolderPickerDlg, then dismayed to find there is currently no way to also show relevant files while browsing the folders. I am more dismayed to see that this issue was first reported four and a half years ago and it still hasn't been addressed
So come on Microsoft listen to your customers!