Export (0) Print
Expand All

ICommDlgBrowser::IncludeObject method

Allows the common dialog box to filter objects that the view displays.

Syntax


HRESULT IncludeObject(
  IShellView *ppshv,
  LPCITEMIDLIST pidl
);

Parameters

ppshv

Type: IShellView*

A pointer to the view's IShellView interface.

pidl

Type: LPCITEMIDLIST

A PIDL, relative to the folder, that identifies the object.

Return value

Type: HRESULT

The browser should return S_OK to include the object in the view, or S_FALSE to hide it.

Remarks

This method is called by the IEnumIDList implementation when hosted in file dialog boxes. The enumerator calls this method to let the common dialog box filter out objects that should not be displayed. Typically, the file dialog boxes will get the display text of the item, and filter by the extension.

Note to Calling Applications

Call this method before returning an object in the Shell folder's IDLIST enumerator.

When dealing with data sources that have many items, such as libraries and searches, the callback to this method results in poor performance. To avoid that situation, implement GetViewFlags and return CDB2GVF_NOINCLUDEITEM. Doing so enables the view to skip calling ICommDlgBrowser::IncludeObject, thereby improving performance.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 4.0 or later)

See also

ICommDlgBrowser
Explorer Browser Search Sample

 

 

Community Additions

ADD
Show:
© 2015 Microsoft