Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message is sent by an application before adding a large number of items to the list box portion of a combo box. This message allocates memory for storing list box items.

Syntax

CB_INITSTORAGE 
wParam = (WPARAM)(int) 
cItems;
  lParam = (LPARAM)(DWORD) 
cb;

Parameters

cItems

Specifies the number of items to add.

cb

Specifies the amount of memory to allocate for item strings, in bytes.

Return Value

The total number of items for which memory has been pre-allocated — that is, the total number of items added by all successful CB_INITSTORAGE messages — indicates success. CB_ERRSPACE indicates failure.

Remarks

The CB_INITSTORAGE message helps speed up the initialization of combo boxes that have a large number of items (over 100). It reserves the specified amount of memory so that subsequent CB_ADDSTRING and CB_INSERTSTRINGmessages take the shortest possible time. You can use estimates for the cItemsand cbparameters. If you overestimate, the extra memory is allocated, if you underestimate, the normal allocation is used for items that exceed the requested amount.

Requirements

Header winuser.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also