LB_INSERTSTRING
This message is sent by an application to insert a string into a list box. Unlike the LB_ADDSTRING message, the LB_INSERTSTRING message does not cause a list with the LBS_SORT style to be sorted.
LB_INSERTSTRING wParam = (WPARAM) index;
lParam = (LPARAM)(LPCTSTR) lpsz;
Parameters
index
Zero-based index of the position at which to insert the string. If this parameter is –1, the string is added to the end of the list.lpsz
Long pointer to the null-terminated string to be inserted.If you create the list box with an owner-drawn style but without the LBS_HASSTRINGS style, the value of the lpsz parameter is stored as item data instead of the string it would otherwise point to. You can send the LB_GETITEMDATA and LB_SETITEMDATA messages to retrieve or modify the item data.
Return Values
The index of the position at which the string was inserted indicates success. LB_ERR indicates that an error has occurred. LB_ERRSPACE indicates that there is insufficient space to store the new string.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
LB_ADDSTRING, LB_GETITEMDATA, LB_SELECTSTRING, LB_SETITEMDATA
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.