<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > ListView Control > Listview Control Commands > ListView: Items functions > ListView_SetItemState |
Description
Changes the state of an item in a list-view control.
Syntax
n = ListView_SetItemState(hWnd, ctrlID, lItem, lState, lMask)
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
hWnd |
Number |
No |
Handle of the dialog containing the list-view control |
ctrlID |
Number |
No |
Control identifier assigned to the control during CONTROL ADD ... |
lItem |
Number |
No |
Row index. Starts from 1 |
lState |
Number |
No |
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. |
lMask |
Number |
Yes |
The mask parameter specifies the state bits you want to modify, and the state parameter specifies the new value for those bits. To set a bit in the item's internal state, set it in both the mask and state parameters. To clear a bit in the item's internal state, set it in the mask parameter and clear it in the state parameter. To leave a bit unchanged in the item's internal state, clear it in the mask parameter. |
Remarks
Restrictions
See also
Examples