Jump to content

LM QUERYITEMTEXT: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:LM_QUERYITEMTEXT}} This message returns the text of the specified list box item. ==Syntax== <pre> param1 SHORT sItemIndex; Item index.: SHORT smaxcount; Maximum count.: param2 PSZ pszItemText; Buffer into which the item text is to be copied.: </pre> ==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, bu..."
 
 
Line 26: Line 26:


==Remarks==
==Remarks==
The list box control window procedure responds to this message by copying up
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'''.
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_
The length of the item text can be determined by using the [[LM_QUERYITEMTEXTLENGTH]] message.
QUERYITEMTEXTLENGTH]] message.


==Default Processing==
==Default Processing==

Latest revision as of 02:18, 28 April 2025

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.