CListView.AddItemmethod
Inserts a new item in a list-view control.
Syntax
FUNCTION AddItem (BYVAL hListView AS HWND, BYVAL iItem AS LONG, BYVAL iImage AS LONG, BYREF wszText AS WSTRING) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hListView | Handle to the ListView control. | |
iItem | Index at which the new item should be inserted. If this value is greater than the number of items currently contained by the listview control, the new item will be appended to the end of the list and assigned the correct index. Examine the return value to determine the actual index assigned to the item. | |
iImage | Index of the item's icon in the control's image list. | |
wszText | The item text. |
Return value
Returns the index of the new item if successful, or -1 otherwise.
Description
Inserts a new item in a list-view control.
Reference
- Include file
CListView.inc - Defined in AfxNova/CListView.inc:1298
- Documented in Windows/WIndows Controls/CListView Class.md
- Topic: CListView Class