IFileOpenDialog with FOS_PICKFOLDERS vs. SHBrowseForFolder





    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?





    Monday, August 27, 2007 1:22 PM

All replies

  • Thanks for this feedback. I have forwarded this on to the feature team for review.




    Tuesday, October 02, 2007 8:53 PM
  • So can you report back on how the review of this feature by the Shell Team went?  Should I just forget about ever having a BIF_BROWSEINCLUDEFILES-like option when using the Vista Pick Folder dialog?


    Sunday, July 04, 2010 5:17 AM
  • I know "me too!" messages aren't that useful, but I would be delighted to see this functionality as well so I figure I may as well try to help this get noticed.
    Thursday, December 15, 2011 7:00 PM
  • 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
    Thursday, January 19, 2012 12:01 AM
  • 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!

    Monday, February 20, 2012 5:25 PM
  • Almost 6 years now.. was this issue addressed ?

    Does the Microsoft logo look smaller every day? or is just me .. :(

    Thursday, July 18, 2013 9:29 PM
  • I would really appreciate having this feature: showing files while giving the user the option to select a folder.
    Sunday, April 06, 2014 12:31 AM
  • Let me add one thing: I would like to have the possibility to be able to let a user select files AND folders at the same time. Imagine an app that allows the user to upload something to some kind of server, and should be able to select whatever he thinks is necessary, including files and fodlers at the same time. I am searching for a solution to implement that for weks now, and haven't found a satisfying way yet. Why don't you make that dialog that flexible that the programmer can select if he wants to have a multislect-files, multiselect-folders, or even both behaviours at the same time?
    Thursday, May 07, 2015 6:56 AM