Jump to content

MM_SETDEFAULTITEMID

From EDM2
Revision as of 02:32, 28 April 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:MM_SETDEFAULTITEMID}} This message is used to set the default item in a conditional cascade menu. ==Syntax== <pre> param1 ULONG ulDefItemID; The menu id of the item to become the new default.: param2 ULONG ulReserved; Reserved value, must be 0.: </pre> ==Parameters== ;ulDefItemID (ULONG) - input: The menu id of the item to become the new default. ;ulReserved (ULONG) - input: Reserved value, must be 0. ==Returns== ;rc (BOOL) - ret...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message is used to set the default item in a conditional cascade menu.

Syntax

param1
ULONG ulDefItemID; /* The menu id of the item to become the new default. */

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

Parameters

ulDefItemID (ULONG) - input
The menu id of the item to become the new default.
ulReserved (ULONG) - input
Reserved value, must be 0.

Returns

rc (BOOL) - return
Success of failure indicator.
TRUE: The conditional cascade default was set.
FALSE: The conditional cascade default was not set.

Remarks

The default item is the menu-id that will be returned if the main menu option is clicked on.

   ┌─────────────┐
   │Open     (->)│  Icon
   └─────────────┤
     *Tree       │  id=MID_TREE
       Details   │  id=MID_DETAILS
   └─────────────┘

In the example above, where MID_TREE is currently the default, if the user clicked on the "Open" option without opening the conditional cascade menu, the menu would send back a notification that MID_TREE was selected.

Default Processing

The default window procedure takes no action other than to return 0.