怎样编程实现windows"文件夹选项"中隐藏文件的显示与隐藏,直觉应在Shell里面,但翻半天msdn就找到一个SHGetSettings,没有类似的SHSetxxx之类的,有劳各位高手出下手.3ks.

解决方案 »

  1.   

    已搜索有关IFolderView的简体中文 和 繁体中文网页。   共有 4 项查询结果,这是第 1 - 2 项。 搜索用时 0.12 秒。 
    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 - 网页快照 - 类似网页 
      

  2.   

    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. 
      

  3.   

    谢谢,看来我还是等到ms出一个SHSetSettings再说吧.