An application sends a CB_GETLBTEXT message to retrieve a string from the list of a combo box.
CB_GETLBTEXT
wParam = (WPARAM) index; // item index
lParam = (LPARAM) (LPCSTR) lpszBuffer; // address of buffer
The return value is the length of the string, in bytes, excluding the terminating null character. If the index parameter does not specify a valid index, the return value is CB_ERR.
If you create the combo box with an owner-drawn style but without the CBS_HASSTRINGS style, the buffer pointed to by the lpszBuffer parameter of the message receives the 32-bit value associated with the item (the item data).
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Combo Boxes Overview, Combo Box Messages, CB_GETLBTEXTLEN