IFolderFilter interface

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

Members

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

Methods

The IFolderFilter interface has these methods.

MethodDescription
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.

ShouldShow

Specifies whether an individual item should be allowed through the filter and which should be blocked. When used with SHBrowseForFolder, specifies which items should be shown in the dialog box tree view and which should not. The determination to show or not show an item is up to the application.

 

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::ShouldShowto determine how to filter the enumeration.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IFolderFilterSite

 

 

Community Additions

ADD
Show:
© 2014 Microsoft