CB_GETLBTEXTLEN
wParam = (WPARAM) index; /* item index */
lParam = 0L; /* not used, must be zero */
An application sends a CB_GETLBTEXTLEN message to retrieve the length of a string in the list box of a combo box.
index
Value of wParam. Specifies the zero-based index of the string.
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.
This example retrieves the length of the first item in the list box of a combo box:
DWORD cbItemString;
cbItemString = SendDlgItemMessage(hdlg, ID_MYCOMBOBOX,
CB_GETLBTEXTLEN, 0, 0L);