IResultData::SetItemCount

[This is preliminary documentation and subject to change.]

Sets the number of items in a virtual list.

HRESULT SetItemCount(
  int nItemCount   // Number of items in the list
  DWORD dwOptions  // Option flags
);
 

Parameters

nItemCount
[in] Number of items that the control will ultimately contain
dwOptions
[in] Combination of the following flags:
Flag Meaning
MMCLV_UPDATE_NOINVALIDATEALL Only repaint if visible items are affected.
MMCLV_UPDATE_NOSCROLL Do not adjust the scroll bar on changed item count.

Return Values

S_OK
The item was successfully set.
E_UNEXPECTED
An unexpected error occurred.
E_INVALIDARG
The pItem parameter is NULL

Remarks

SetItemCount supports virtual lists.

Prepares a list view control for adding a large number of items.

By calling this function before adding a large number of items, you enable a list view control to reallocate its internal data structures only once rather than every time you add an item.

See Also

IResultOwnerData