IResultData::SetItemCount method (mmc.h)
The IResultData::SetItemCount method sets the number of items in a virtual list.
Syntax
HRESULT SetItemCount(
[in] int nItemCount,
[in] DWORD dwOptions
);
Parameters
[in] nItemCount
The number of items that the control will contain.
[in] dwOptions
Combination of the following flags:
MMCLV_UPDATE_NOINVALIDATEALL
Only repaint items added or removed at the bottom of the result pane. Set this flag only if items are removed or added at the bottom of the list.
MMCLV_UPDATE_NOSCROLL
Do not adjust the scroll bar on changed item count.
Return value
This method can return one of these values.
Remarks
The primary purpose of the SetItemCount method is to populate virtual lists. Because items are not actually added to a virtual list, this is the way to notify the list how many virtual items exist.
SetItemCount can be called for nonvirtual lists as well, but for a different purpose. When called for a nonvirtual list, SetItemCount preallocates memory for the specified number of items. When adding a large number of items, this improves performance by reducing the number of memory allocation calls the list must do.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | mmc.h |
DLL | Mmcndmgr.dll |