Purpose |
Return the state of a specified menu item. | ||||||||||||
Syntax |
MENU GET STATE hMenu, [BYCMD] pos& TO state& | ||||||||||||
Remarks |
Retrieves the menu flags associated with the specified menu item. If the menu item activates a pop-up menu, this function returns the number of items in that pop-up menu. | ||||||||||||
hMenu |
Double-word or Long-integer variable containing the handle of the menu containing the item to examine. | ||||||||||||
pos& |
Position within the menu of the menu item to examine. If the BYCMD option is specified, pos& specifies the unique menu item identifier of the item to examine. Otherwise, pos& indicates the physical position of the menu item within the menu, where pos& = 1 for the first position, pos& = 2 for the second position, and so on. | ||||||||||||
state& |
Long-integer variable where the menu state will be placed. If the specified menu item does not exist, the result is -1. If the menu item is a popup child menu, the LO(BYTE, state&) of the return value contains the menu flags for the item, and the HI(BYTE, state&) contains the number of items in the popup child menu. Otherwise the result is a bitmask containing one or more of the following, combined together with the OR operator to form the bitmask:
| ||||||||||||
See also |
Dynamic Dialog Tools, Menus, MENU ADD POPUP, MENU ADD STRING, MENU ATTACH, MENU DELETE, MENU DRAW BAR, MENU GET TEXT, MENU NEW BAR, MENU NEW POPUP, MENU SET STATE, MENU SET TEXT |