Jump to content

MM_QUERYITEMTEXTLENGTH

From EDM2
Revision as of 02:28, 28 April 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:MM_QUERYITEMTEXTLENGTH}} This message returns the text length of the specified menu item. ==Syntax== <pre> param1 USHORT usitem; Item identifier.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ==Parameters== ;usitem (USHORT) - input: Item identifier. ;ulReserved (ULONG) - input: Reserved value, should be 0. ==Returns== ;sLength (SHORT) - return: Length of item text. ::The length of the text string, excluding t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message returns the text length of the specified menu item.

Syntax

param1
USHORT usitem;      /* Item identifier. */

param2
ULONG ulReserved; /* Reserved value, should be 0. */

Parameters

usitem (USHORT) - input
Item identifier.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

sLength (SHORT) - return
Length of item text.
The length of the text string, excluding the null termination character.
0: Error occurred. For example, no item of the specified identity exists
or the item has no text. No text is copied.
Other: Length of item text.

Remarks

The menu control window procedure responds to this message by returning the length in characters of the text of the identified item, if it has a style of MIS_TEXT.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it, other than to set sLength to the default value of 0.