Partager via


IShellView::SelectItem

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method changes the selection state of one or more items within the shell view window.

Syntax

HRESULT SelectItem(
  LPCITEMIDLIST pidlItem,
  UINT uFlags
);

Parameters

  • uFlags
    Flag specifying what type of selection to apply. This parameter can be one of the following values:

    Flag Description

    SVSI_CHECK

    This flag specifies that the item should be checked. This flag is used with items in views where the checked mode is supported.

    SVSI_DESELECT

    This flag is used to deselect the specified item.

    SVSI_DESELECTOTHERS

    This flag is used to deselect all but the specified item. If pidlItem is NULL, all items are deselected.

    SVSI_EDIT

    This flag is used to put pidlItem in edit mode.

    SVSI_ENSUREVISIBLE

    This flag is used to ensure that the item is displayed on the screen.

    SVSI_FOCUSED

    This flag specifies that the item should be given the focus.

    SVSI_NOSTATECHANGE

    This flag specifies that the state of the item should not be changed.

    SVSI_POSITIONITEM

    This flag enables the window's default view to position the item. In most cases, this will place the item in the first available position. However, if the SelectItem call comes during the processing of a mouse-positioned context menu, the position of the context menu is used to position the item.

    SVSI_SELECT

    This flag specifies that the item should be selected.

    SVSI_SELECTIONMARK

    This flag marks the item so that it can be queried.

    SVSI_TRANSLATEPT

    This flag specifies that the input point is in screen coordinates and should be converted to the list-view client coordinates.

Return Value

Returns NOERROR if successful, or an OLE-defined error value otherwise.

Remarks

This method is used to implement the Target command from the File menu of the shell shortcut property sheet.

Requirements

Header shobjidl.h, shobjidl.idl
Library Developer Implemented
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IShellView
Standard Shell Interfaces