http://www.codeproject.com/dialog/cfolderdialog.aspUnder Microsoft® Windows® XP or later,you cand do custom filtering on the contents of the dialog box. To create a custom filter, follow these steps: Set the BIF_NEWDIALOGSTYLE flag in the uFlags member of the CFolderDialog constructor. Ovveride the OnIUnknown virual member function in the derived class. On OnIUnknown, the function's lpIUnknown parameter will contain a pointer to an instance of IUnknown. Call QueryInterface on that IUnknown to obtain a pointer to an IFolderFilterSite. Create an object that implements IFolderFilter - derive a class from it that implements all basic pure virtual member functions of IUnknown and implement IFolderFilterSite::ShouldShow and IFolderFilterSite::GetEnumFlags functions, that do filtering. Call IFolderFilterSite::SetFilter, passing it a pointer to your custom IFolderFilter derived class. IFolderFilterSite::ShouldShow and IFolderFilterSite::GetEnumFlags methods can then be used to include and exclude items from the tree. Once the filter is created, the IFolderFilterSite interface is no longer needed. Call IFolderFilterSite::Release if you have no further use for it.
Shell 中的新功能
... 文件夹视图对象用于显示文件夹的内容。在Windows 的早期版本中您使用IShellView
接口实现文件夹视图对象,但现在有了新接口IFolderView,该接口是专为对文
件夹对象进行编程而设计的。您可以使用IFolderView 接口提供的方法检索信息 ...
www.microsoft.com/china/msdn/library/shellcc/platform/shell/shell_new/whatsnew.asp - 26k - 网页快照 - 类似网页 jiangsheng
... 通过XP新增的IFolderView接口,可以通过这个接口设置列表的查看
模式,例如设置成缩略图视图或者详细信息视图,但是在XP之前
的操作系统上不支持这个接口。有没有什么还没公开的方法?. ...
blog.joycode.com/jiangsheng/posts/6152.aspx - 11k - 网页快照 - 类似网页
Create an object that implements IFolderFilter - derive a class from it that implements all basic pure virtual member functions of IUnknown and implement IFolderFilterSite::ShouldShow and IFolderFilterSite::GetEnumFlags functions, that do filtering.
Call IFolderFilterSite::SetFilter, passing it a pointer to your custom IFolderFilter derived class. IFolderFilterSite::ShouldShow and IFolderFilterSite::GetEnumFlags methods can then be used to include and exclude items from the tree.
Once the filter is created, the IFolderFilterSite interface is no longer needed. Call IFolderFilterSite::Release if you have no further use for it.