Partager via


ListView_SetItemCountEx

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This macro sets the virtual number of items in a virtual list-view control.

Syntax

void ListView_SetItemCountEx(
  HWND hwndLV, 
  int cItems, 
  DWORD dwFlags 
);

Parameters

  • hwndLV
    Handle to a virtual list-view control.
  • cItems
    Number of items that the list-view control will contain.
  • dwFlags
    Specifies the behavior of the list-view control after resetting the item count. It can be one or a combination of the following values.

    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 Value

None.

Remarks

This macro is intended only for list-view controls that use the LVS_OWNERDATA and LVS_REPORT or LVS_LIST styles.

If the list-view control was created with the LVS_OWNERDATA style, this macro sets the virtual number of items that the control contains.

If the list-view control was created without the LVS_OWNERDATA style, the ListView_SetItemCount macro should be used.

Related message: LVM_SETITEMCOUNT

Requirements

Header commctrl.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

LVM_SETITEMCOUNT
List-View Controls Macros