IFolderFilter interface (shobjidl_core.h)

Exposed by a client to specify how to filter the enumeration of a Shell folder by a server application.

Inheritance

The IFolderFilter interface inherits from the IUnknown interface. IFolderFilter also has these types of members:

Methods

The IFolderFilter interface has these methods.

 
IFolderFilter::GetEnumFlags

Allows a client to specify which classes of objects in a Shell folder should be enumerated. When used with SHBrowseForFolder, specifies the class or classes of items that should be shown in the dialog box tree view and which class or classes should not.
IFolderFilter::ShouldShow

Specifies whether an individual item should be allowed through the filter and which should be blocked.

Remarks

This interface is most often used with SHBrowseForFolder to filter the contents of the tree view displayed in a folder selection dialog box. To use IFolderFilter with SHBrowseForFolder, the BIF_NEWDIALOGSTYLE flag must be set.

When your application calls SHBrowseForFolder, you become a client of the folder browser object. The folder browser object communicates with you by sending messages to a callback function, BrowseCallbackProc. The BFFM_IUNKNOWN message handled by that callback function contains a pointer to the folder browser's IUnknown interface. To filter the display of a folder's contents, do the following:

  1. Use the folder browser's QueryInterface method to request a pointer to the IFolderFilterSite interface.
  2. Call IFolderFilterSite::SetFilter, passing it a pointer to your IFolderFilter interface.
  3. The folder browser then queries IFolderFilter::GetEnumFlags and IFolderFilter::ShouldShow to determine how to filter the enumeration.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)

See also

IFolderFilterSite