views:

156

answers:

1

I've created an instance of IExplorerBrowser in my code to create a custom I/O view in one of my dialogs. I've implemented the IServiceProvider and ICommDlgBrowser interfaces in my host class. I use the IExplorerBrowser::BrowseToIDList method to fill the view.

I would like to filter the file types displayed (ex. only PNG files). If I call BrowseToIDList with *FOLDERID_Pictures* (i.e. "My Pictures") I can use the ICommDlgBrowser::IncludeObject method or IFolderFilter::ShouldShow to restrict which files I allow to be displayed. However, if I browse to the Picture Library on Windows 7 (*FOLDERID_PicturesLibrary*), neither ICommDlgBrowser::IncludeObject nor IFolderFilter::ShouldShow are ever called.

Is there some limitation to filtering files in libraries on Win7 that I'm unaware of? Perhaps I'm missing an interface or maybe I've specified the wrong flag somewhere.

Any ideas would be greatly appreciated.

A: 

I've had a chance to research this further, including asking a few questions to some Microsoft developers. It would appear, unfortunately, that filtering does not work with query backed views (i.e. Libraries).

An alternative to my approach would be to use the Common Item Dialog with application added controls (via IFileDialogCustomize).

(http://msdn.microsoft.com/en-us/library/bb776913(VS.85).aspx)

In my specific case, I'm unable to use a Common Item Dialog, but I thought it might be worthwhile to post this information here for future reference.

If in the future I find any way to filter an IExplorerBrowser control, I'll post that back here too.

Daniel Jette