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_QUERYITEM (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMENUS
 
MM_QUERYITEM
mp1 = MPFROM2SHORT((USHORT) idItem, (BOOL) fIncludeSubMenus);
mp2 = (MPARAM) pmi;    /* pointer to MENUITEM structure */
 
An application sends an MM_QUERYITEM message to copy information about the
item to a MENUITEM structure. This message does not retrieve the text for
items that have the style MIS_TEXT. The application must use the
MM_QUERYITEMTEXT message to retrieve these items.
 
Parameter         Description
────────────────────────────────────────────────────────────────────────────
 
idItem            Low word of mp1. Identifies the menu item.
 
fIncludeSubMenus  High word of mp1. Specifies whether to include submenus in
                  the search for an item that matches the idItem parameter.
 
pmi               Low and high word of mp2. Points to a MENUITEM structure.
 
Return Value
 
The return value is TRUE if the operation is successful or FALSE if an error
occurs.
 
See Also
 
MENUITEM, MM_QUERYITEMTEXT, MM_SETITEM