LM_QUERYITEMTEXT
Appearance
This message returns the text of the specified list box item.
Syntax
param1 SHORT sItemIndex; /* Item index. */ SHORT smaxcount; /* Maximum count. */ param2 PSZ pszItemText; /* Buffer into which the item text is to be copied. */
Parameters
- sItemIndex (SHORT) - input
- Item index.
- smaxcount (SHORT) - input
- Maximum count.
- 0: No text is copied.
- Other: Copy the item text as a null-terminated string, but limit the number of
- characters copied, including the null termination character, to this value.
- pszItemText (PSZ) - input
- Buffer into which the item text is to be copied.
- This points to a string (character) buffer.
Returns
- sTextLength (SHORT) - return
- Length of item text.
- The length of the text string, excluding the null termination character.
Remarks
The list box control window procedure responds to this message by copying up to smaxcount characters, as a null-terminated string, from the text of the item specified by sItemIndex into the buffer identified by pszItemText.
The length of the item text can be determined by using the [[LM_ QUERYITEMTEXTLENGTH]] message.
Default Processing
The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set sTextLength to the default value of 0.