CB_GETLBTEXTLEN

3.0

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.

Parameters

index

Value of wParam. Specifies the zero-based index of the string.

Return Value

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.

Example

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);

See Also

CB_GETLBTEXT