CListBox.SetAnchorIndexmethod
Sets the anchor item--that is, the item from which a multiple selection starts.
Syntax
FUNCTION SetAnchorIndex (BYVAL hListBox AS HWND, BYVAL index AS LONG) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hListBox | The handle of the listbox control. | |
index | Specifies the zero-based index of the new anchor item. |
Return value
If the message succeeds, the return value is zero.
If the message fails, the return value is LB_ERR.
Description
Sets the anchor item that is, the item from which a multiple selection starts. A multiple selection spans all items from the anchor item to the caret item.
Example
CListBox.SetAnchorIndex(hListBox, 4)
Reference
- Include file
CListBox.inc - Defined in AfxNova/CListBox.inc:436
- Documented in Windows/WIndows Controls/CListBox Class.md
- Topic: CListBox Class