ListView_SetItemState(
HWND hwnd,
int i,
UINT state,
UINT mask
);
state
New state bits for the item. The
mask parameter indicates the valid
bits of the
state parameter. The macro ignores bits in the
state
parameter if the corresponding bit is not set in the
mask parameter. The
low-order byte contains a set of bit flags that indicate the item's state. This
byte can be a combination of the following values:
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. Items will
only show as selected if the list-view control has focus or the LVS_SHOWSELALWAYS style is
used.
mask
Bits of the
state parameter that you want to set or clear. You can
use
ListView_SetItemState both to set and to clear bits. To set an item's
overlay image index, set the LVIS_OVERLAYMASK bits. To set an item's state image
index, set the LVIS_STATEIMAGEMASK bits.