ListView_SetItemCount

The ListView_SetItemCount macro prepares a list view control for adding a large number of items. You can use this macro or explicitly send the LVM_SETITEMCOUNT message.

VOID ListView_SetItemCount(

HWND hwnd,  
int cItems  
);  

Parameters

hwnd

Handle to the list view control.

cItems

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

Return Values

No return value.

Remarks

By using the ListView_SetItemCount macro or the LVM_SETITEMCOUNT message before adding a large number of items, you enable a list view control to reallocate its internal data structures only once rather than every time you add an item.

See Also

LVM_SETITEMCOUNT