Share via


ListView_GetItemState

This macro retrieves the state of a list view item. You can use this macro or send the LVM_GETITEMSTATE message explicitly.

UINT WINAPI ListView_GetItemState( 
HWND hwnd, 
int i, 
UINT mask );

Parameters

  • hwnd
    Handle to the list view control.
  • i
    Index of the list view item.
  • mask
    State information to retrieve. It can be a combination of the following values:
    Value Description
    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 the 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 the focus and also on the system colors used for selection.
    LVIS_OVERLAYMASK Use this mask to retrieve the items overlay image index.
    LVIS_STATEIMAGEMASK Use this mask to retrieve the items state image index.

Return Values

Returns the current state for the specified item. The only valid bits in the return value are those that correspond to the bits set in the mask parameter.

Remarks

An items state information includes a set of bit flags as well as image list indexes that indicate the items state image and overlay image.

Related message: LVM_GETITEMSTATE

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Commctrl.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

ListView_SetItemState

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.