List View Item States

Every list view item has a current state that determines its appearance and functionality. You can retrieve and set this state by sending the LVM_GETITEM, LVM_SETITEM, and LVM_SETITEMSTATE messages or by using the ListView_GetItem and ListView_SetItem macros. You set or retrieve the item state in the state member of the LV_ITEM structure that you pass in the pItem parameter, lParam, to these messages and macros. List view item states supported by Windows CE are described in the following table.

State 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_LINK The item is a link.
LVIS_PUSHED The button-like item appears pushed. This value has no effect, unless the LVS_BUTTON window style is used.
LVIS_SELECTED The item is selected. The appearance of a selected item depends on whether it has the focus and on the system colors used for selection.

You can use the LVIS_OVERLAYMASK mask to isolate the state bits that contain the one-based index of the overlay image. You can use the LVIS_STATEIMAGEMASK mask to isolate the state bits that contain the one-based index of the state image.