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_QUERYITEMATTR (1.2)
◄Message Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINMENUS
MM_QUERYITEMATTR
mp1 = MPFROM2SHORT((USHORT) idItem, (BOOL) fIncludeSubMenus);
mp2 = MPFROMSHORT((USHORT) rgfAttributeMask);
An application sends an MM_QUERYITEMATTR message to determine the state of
the specified attributes of a menu item.
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.
rgfAttributeMask Low word of mp2. Specifies the attributes to get the state
of. This parameter can be any combination of the following
values:
Value Meaning
──────────────────────────────────────────────────────────
MIA_CHECKED A check mark appears to the left of the
menu item.
MIA_DISABLED The menu item is disabled.
MIA_FRAMED The menu item is framed by vertical lines
to the left and right.
MIA_HILITED The menu item is selected (highlighted).
MIA_NODISMISS Indicates whether the menu is self
dismissing.
Return Value
The return value is the state of the attributes specified in the
rgfAttributeMask parameter for the menu item specified by the idItem
parameter.
Example
This example sends an MM_QUERYITEMATTR message to find the state of the
idCase menu item. It then toggles the state of the item and sends an
MM_SETITEMATTR message to set the new state.
sState = (SHORT) WinSendMsg(hwndMenu, MM_QUERYITEMATTR,
MPFROM2SHORT(idCase, TRUE), MPFROMSHORT(MIA_CHECKED));
sState ^= MIA_CHECKED;
WinSendMsg(hwndMenu, MM_SETITEMATTR, MPFROM2SHORT(idCase, TRUE),
MPFROM2SHORT(MIA_CHECKED, sState));
See Also
MM_SETITEMATTR
♦