CListView.SetItemCountmethod
Causes the list-view control to allocate memory for the specified number of items.
Syntax
FUNCTION SetItemCount (BYVAL hListView AS HWND, BYVAL cItems AS LONG) AS LRESULT
Parameters
| Name | Description | |
|---|---|---|
hListView | Handle to the ListView control. | |
cItems | The number of items that the list-view control will contain. |
Return value
Returns nonzero if successful, or zero otherwise.
Description
Causes the list-view control to allocate memory for the specified number of items.
Remarks
If the list-view control was created without the LVS_OWNERDATA style, this method causes the control to allocate its internal data structures for the specified number of items. This prevents the control from having to allocate the data structures every time an item is added.
If the list-view control was created with the LVS_OWNERDATA style (a virtual list view), the SetItemCountEx method should be used.
Reference
- Include file
CListView.inc - Defined in AfxNova/CListView.inc:1654
- Documented in Windows/WIndows Controls/CListView Class.md
- Topic: CListView Class