LVM_SETITEMCOUNT (Windows CE 5.0)

Send Feedback

This message prepares a list-view control for adding a large number of items. In a regular list-view control, it causes the control to allocate memory for the specified number of items. In a virtual list-view control, available in Windows CE 2.0 and later, it sets the number of virtual items in the control. You can send this message explicitly or use the ListView_SetItemCount or ListView_SetItemCountEx macro.

LVM_SETITEMCOUNT wParam = (WPARAM) (int)cItems;lParam = (LPARAM)dwFlags;

Parameters

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

  • dwFlags
    For Windows CE 1.0 and 1.01, set this value to 0.

    For Windows CE 2.0 and later, this value specifies the behavior of the list-view control after resetting the item count. This value can be a combination of the following.

    Value Description
    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 Values

In Windows CE 1.0 and 1.01, this message has no return value.

In Windows CE 2.0 and later, nonzero indicates success. Zero indicates failure.

Remarks

Windows CE 2.0 and later support virtual list views, which you create using the LVS_OWNERDATA style. In a virtual list view, this function sets the number of items in the virtual list view, but does not allocate any memory.

The dwFlags parameter is intended only for list-view controls that use the LVS_OWNERDATA and either LVS_REPORT or LVS_LIST styles.

Related macro:ListView_SetItemCount

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.

See Also

ListView_SetItemCount | List-View Controls Messages

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.