msgs12.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MM_SELECTITEM (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMENUS
 
MM_SELECTITEM
mp1 = MPFROM2SHORT((USHORT) idItem, (BOOL) fIncludeSubMenus);
mp2 = MPFROMSHORT(0, (BOOL) fDismiss);
 
An application sends an MM_SELECTITEM message to select or dismiss a menu
item. If an item is selected and the fDismiss parameter is TRUE, a
WM_COMMAND, WM_SYSCOMMAND, or WM_HELP message is posted to the owner and the
menu is dismissed.
 
Parameter         Description
────────────────────────────────────────────────────────────────────────────
 
idItem            Low word of mp1. Identifies the item. If a MID_NONE value
                  is used, the selection is set to none.
 
fIncludeSubMenus  High word of mp1. Specifies whether to include submenus in
                  the search for an item that matches the idItem parameter.
 
fDismiss          High word of mp2. Specifies whether the menu is to be
                  dismissed (hidden). A value of TRUE posts a WM_COMMAND,
                  WM_SYSCOMMAND, or WM_HELP message before dismissing the
                  item.
 
Return Value
 
The return value is TRUE if the operation is successful or FALSE if an error
occurs.
 
See Also
 
MM_QUERYSELITEMID, WM_COMMAND, WM_HELP, WM_SYSCOMMAND