msgs12.hlp (Topic list)
LM_QUERYITEMTEXT (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINLISTBOXES
 
LM_QUERYITEMTEXT
mp1 = MPFROM2SHORT((SHORT) iItem, (SHORT) cch); /* item-buffer size    */
mp2 = MPFROMP((FAR *) pszText);                 /* buffer for the text */
 
An application sends an LM_QUERYITEMTEXT message to copy the text for a
specified list-box item into a buffer provided by the caller. The size of
the buffer can be determined by sending an LM_QUERYITEMTEXTLENGTH message
for the item.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
iItem      Low word of mp1. Specifies the index of the item.
 
cch        High word of mp1. Specifies the maximum number of characters to
           get.
 
pszText    Low and high word of mp2. Points to the buffer to receive the
           item's text.
 
Return Value
 
The return value is the length of the text string copied, not including the
null termination character.
 
See Also
 
LM_QUERYITEMTEXTLENGTH, LM_SETITEMTEXT, WM_DRAWITEM