Jump to content

MM ITEMIDFROMPOSITION

From EDM2
Revision as of 18:59, 25 April 2025 by Martini (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message returns the identity of a menu item of a specified index.

Syntax

param1
SHORT sItemIndex;  /* Item index. */

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

Parameters

sItemIndex (SHORT) - input
Item index.
ulReserved (ULONG) - input
Reserved value, should be 0.

Returns

sIdentity (SHORT) - return
Item identity.
MIT_ERROR: Error occurred; for example, because sItemIndex is not valid.
Other: Item identity.

Remarks

The menu control window procedure responds to this message by setting sIdentity to the identity of the item whose position is identified by the index specified in sItemIndex.

Note
It must be sent, not posted, to the menu control.

Default Processing

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