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. |
This message is sent by an application to add a string to a list box. If the list box does not have the LBS_SORT style, the string is added to the end of the list. Otherwise, the string is inserted into the list and the list is sorted.
LB_ADDSTRING wParam= 0 ; lParam= (LPARAM)(LPCTSTR) lpsz ;
Parameters
If you create the list box with an owner-drawn style, but without the LBS_HASSTRINGS style, the value of the lpszparameter is stored as item data instead of the string it would otherwise point to. You can send the LB_GETITEMDATAand LB_SETITEMDATAmessages to retrieve or modify the item data.
Return Values
The zero-based index of the string in the list box indicates success. LB_ERR indicates that an error has occurred. LB_ERRSPACE indicates that there is insufficient space to store the new string.
Remarks
Windows CE does not support owner draw list boxes.
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_DELETESTRING, LB_GETITEMDATA, LB_INSERTSTRING, LB_SELECTSTRING, LB_SETITEMDATA