LM_INSERTMULTITEMS
This message inserts one or more items into a list box.
Syntax
param1 PLBOXINFO pListboxInfo; /* Pointer to a structure containing list box information. */ param2 PSZ *papszText; /* Pointer to an array of pointers to text strings. */
Parameters
- pListboxInfo (PLBOXINFO) - input
- Pointer to a structure containing list box
- information.
- papszText (PSZ *) - input
- Pointer to an array of pointers to text strings.
- This parameter is a pointer to an array of pointers to zero-terminated
- strings. The array must contain at least ulItemCount items. (ulItemCount is a
- field in LBOXINFO).
- If this parameter is set to NULL, a ulItemCount number of empty items are
- inserted into the list. This is useful for ownerdraw listboxes that do not make use
- of text strings.
Returns
- lCount (LONG) - return
- Number of items successfully inserted into the list.
- If the number of items is not the same as ulItemCount, an error has occurred.
Remarks
LM_INSERTMULTITEMS inserts multiple items into a list box at one time, up to 32 768 items.
If either LIT_SORTASCENDING or LIT_SORTDESCENDING is specified in the lItemIndex field of LBOXINFO, then the complete list is sorted after the items have been inserted. If items are being added using several LM_INSERTMULTITEMS messages, it is faster to specify LIT_END for all the insert messages except the last one, and then set one of the sort flags to sort the entire list after the last set of items have been inserted.
The sorting sequence is the same as that defined for WinCompareStrings.
WM_MEASUREITEM (in List Boxes) is sent to the owner of an ownerdraw list box for every item inserted into the list box.
Default Processing
The default message procedure sets lCount to zero.