Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ListView_SetItemCountEx macro (commctrl.h)
Sets the virtual number of items in a virtual list view. You can use this macro or send the LVM_SETITEMCOUNT message explicitly.
Syntax
LRESULT ListView_SetItemCountEx(
HWND hwndLV,
int cItems,
DWORD dwFlags
);
Parameters
hwndLV
Type: HWND
A handle to a virtual list-view control.
cItems
Type: int
The number of items that the list-view control will contain.
dwFlags
Type: DWORD
Values that specify the behavior of the list-view control after resetting the item count. This value can be a combination of the following:
| Value | Meaning |
|---|---|
|
The list-view control will not repaint unless affected items are currently in view. |
|
The list-view control will not change the scroll position when the item count changes. |
Return value
Type: LRESULT
Returns nonzero if successful, or zero otherwise.
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.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | commctrl.h |
Feedback
Was this page helpful?
