Jump to content

MM_SETITEM

From EDM2
Revision as of 02:33, 28 April 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:MM_SETITEM}} This message sets the definition of a menu item. ==Syntax== <pre> param1 USHORT usReserve; Reserved value, should be 0.: USHORT usincludesubmenus; Include submenus indicator.: param2 PMENUITEM pmenuitem; Menu-item data structure.: </pre> ==Parameters== ;usReserve (USHORT) - input: Reserved value, should be 0. ;usincludesubmenus (USHORT) - input: Include submenus indicator. ::TRUE: If the menu does not have...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message sets the definition of a menu item.

Syntax

param1
USHORT usReserve;         /* Reserved value, should be 0. */
USHORT usincludesubmenus; /* Include submenus indicator. */

param2
PMENUITEM pmenuitem;     /* Menu-item data structure. */

Parameters

usReserve (USHORT) - input
Reserved value, should be 0.
usincludesubmenus (USHORT) - input
Include submenus indicator.
TRUE: If the menu does not have an item with the specified identifier, search
the submenus and subdialogs of the menu for an item with the specified identifier
and set its definition.
FALSE: If the menu does not have an item with the specified identifier, do not
search the submenus and subdialogs of the menu for an item with the specified
identifier.
pmenuitem (PMENUITEM) - input
Menu-item data structure.
This points to a MENUITEM structure.

Returns

rc (BOOL) - return
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

The menu control window procedure responds to this message by using the specified structure to update the definition of the identified menu item. The iPosition field of the structure specified by pmenuitem is ignored, as the position of the item cannot be changed by use of this message.

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 rc to the default value of FALSE.