Contents Index Topic Contents | ||
Previous Topic: LVM_SETITEM Next Topic: LVM_SETITEMPOSITION |
LVM_SETITEMCOUNT
LVM_SETITEMCOUNT wParam = (WPARAM) (int) cItems; lParam = (LPARAM) dwFlags;Causes the list view control to allocate memory for the specified number of items or sets the virtual number of items in a virtual list view control. This depends on how the list view control was created. You can send this message explicitly or use the ListView_SetItemCount or ListView_SetItemCountEx macros.
- Returns nonzero if successful, or zero otherwise.
- cItems
- Number of items that the list view control will ultimately contain.
- dwFlags
- Version 4.70. Values that specify the behavior of the list view control after resetting the item count. This value can be a combination of the following:
LVSICF_NOINVALIDATEALL The list view control will not repaint unless affected items are currently in view. LVSICF_NOSCROLL The list view control will not change the scroll position when the item count changes. If the list view control was created without the LVS_OWNERDATA style, sending this message 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), sending this message sets the virtual number of items that the control contains.
The dwFlags parameter is intended only for list view controls that use the LVS_OWNERDATA and LVS_REPORT or LVS_LIST styles.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.