Share via


ListView_SetItemCount

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

void ListView_SetItemCount( 
HWND hwndLV, 
int cItems );

Parameters

  • hwndLV
    Handle to a list view control.
  • cItems
    Number of items for which the list view control should allocate memory.

Return Values

None.

Remarks

If the list view control was created without the LVS_OWNERDATA style, this macro 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 ListView_SetItemCountEx macro should be used.

In Windows CE versions 2.0 and later, if the list view control is a virtual list view (has the LVS_OWNERDATA style), use the ListView_SetItemCountEx macro instead.

Related message: LVM_SETITEMCOUNT

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Commctrl.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

ListView_SetItemCountEx

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.