Export (0) Print
Expand All
Expand Minimize

LVM_SETITEMCOUNT message

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.

Parameters

wParam

Number of items that the list-view control will ultimately contain.

lParam

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:

ValueMeaning
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.

 

Return value

Returns nonzero if successful, or zero otherwise.

Remarks

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 lParam parameter is intended only for list-view controls that use the LVS_OWNERDATA and LVS_REPORT or LVS_LIST styles.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft