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_ISITEMVALID (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMENUS
 
MM_ISITEMVALID
mp1 = MPFROM2SHORT((USHORT) idItem, (BOOL) fIncludeSubMenus);
mp2 = MPFROMSHORT((BOOL) fValidIfNotFound;
 
An application sends an MM_ISITEMVALID message to determine if a menu item
can be selected. The menu control sends a WM_INITMENU message before
checking the state of the menu item and a WM_MENUEND message after checking
the state.
 
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.
 
fValidIfNotFound  Low word of mp2. Specifies the value to return if the item
                  is not found.
 
Return Value
 
The return value is TRUE if the specified menu item can be selected or
chosen, or FALSE if the item cannot be selected or does not exist.
 
See Also
 
WM_INITMENU, WM_MENUEND