IResultData::ModifyItemState

[This is preliminary documentation and subject to change.]

Allows the snap-in to modify the state of an item.

HRESULT ModifyItemState(
  int nIndex,          // index of the item to be modified
  HRESULTITEM itemID,  // item identifier
  UINT uAdd,           // listview-item state flags
  UINT uRemove         // listview-item state flags
);
 

Parameters

nIndex
[in] Specifies the index of the item whose state is to be modified. This parameter is used only when the itemID parameter is zero.
When applied to virtual lists, you must use nIndex.
itemID
[in] Unique identifier of the item whose state is to be modified.
When applied to virtual lists, set itemID = 0.
uAdd
[in] Specifies which Win32 list-view state flags can be set. This value can be any valid combination of the following:
When applied to virtual lists, only focus and select states can be modified.
Value Meaning
LVIS_CUT The item is marked for a cut-and-paste operation.
LVIS_DROPHILITED The item is highlighted as a drag-and-drop target.
LVIS_FOCUSED The item has focus, so it is surrounded by a standard focus rectangle. Although more than one item may be selected, only one item can have the focus.
LVIS_SELECTED The item is selected. The appearance of a selected item depends on whether it has focus and on the system colors used for selection.

uRemove
[in] Specifies the list-view item state flags that can be removed. This value can be any valid combination of theWin32 LVIS_* flags shown for the uAdd parameter shown above.

Return Values

S_OK
The item was successfully set.
S_FALSE
The item was not found.
E_UNEXPECTED
An unexpected error occurred.

See Also

IResultData