MENU GET STATE statement

Purpose | Return the state of a specified menu item.
Syntax | MENU GET STATE hMenu, [BYCMD] position& TO state&
Remarks | Retrieves the menu flags associated with the specified menu item.
hMenu | Handle of the menu containing the item to examine.
position& | Position within the menu of the menu item to examine. If the BYCMD option is specified, position& specifies the unique menu item identifier of the item to examine. Otherwise, position& indicates the physical position of the menu item within the menu, where position& = 1 for the first position, position& = 2 for the second position, and so on.

state&

Long integer variable where the menu state will be placed. If the item does not exist, the result is -1. Otherwise the result is a bitmask containing one or more of the following, combined together with the OR operator to form the bitmask:

%MFS_CHECKED | Menu item has a checkmark next to it.
%MFS_DEFAULT | Menu item is the default item.
%MFS_DISABLED | Menu item is disabled and cannot be selected.
%MFS_ENABLED | Menu item is enabled and can be selected.
%MFS_GRAYED | Menu item is disabled and cannot be selected, and is drawn in a "grayed" state.
%MFS_HILITE | Menu item is highlighted.
%MFS_UNCHECKED | Menu item does not have a checkmark next to it.
%MFS_UNHILITE | Menu item is not highlighted.

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