CB_GETLBTEXT

Version 3.0

This message copies a string from the list box of a combo box into a buffer.

Parameter

Description

 

wParam

Contains the index of the string to be copied.

 

lParam

Points to a buffer that is to receive the string. The buffer must have sufficient space for the string and a terminating null character.

 

Return Value

The return value is the length of the string in bytes, excluding the terminating null character. If wParam does not specify a valid index, the return value is CB_ERR.

Comments

If the combo box was created with an owner-draw style but without the CBS_HASSTRINGS style, the buffer pointed to by the lParam parameter of the message receives the 32-bit value associated with the item through the lParam parameter of the CB_ADDSTRING or CB_INSERTSTRING message.