Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LVM_SETITEMCOUNT

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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;

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.

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.

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

Headercommctrl.h
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft