# MODIFYMENUFLAGSQQ (W*S)

QuickWin Function: Modifies a menu item's state.

## Module

USE IFQWIN

result = MODIFYMENUFLAGSQQ (menuID,itemID,flag)

menuID | (Input) INTEGER(4). Identifies the menu containing the item whose state is to be modified, starting with 1 as the leftmost menu.
itemID | (Input) INTEGER(4). Identifies the menu item whose state is to be modified, starting with 0 as the top item.
flags | (Input) INTEGER(4). Constant indicating the menu state. Flags can be combined with an inclusive OR (see the Results section below). The following constants are available: $MENUGRAYED - Disables and grays out the menu item. $MENUDISABLED - Disables but does not gray out the menu item. $MENUENABLED - Enables the menu item. $MENUSEPARATOR - Draws a separator bar. $MENUCHECKED - Puts a check by the menu item. $MENUUNCHECKED - Removes the check by the menu item.

## Results

The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, .FALSE..

The constants available for flags can be combined with an inclusive OR where reasonable, for example $MENUCHECKED .OR. $MENUENABLED. Some combinations do not make sense, such as $MENUENABLED and $MENUDISABLED, and lead to undefined behavior.

## Example

     USE IFQWIN
     LOGICAL(4)    result
     CHARACTER(20) str
     ! Append item to the bottom of the first (FILE) menu
     str = '&Add to File Menu'C
     result = APPENDMENUQQ(1, $MENUENABLED, str, WINSTATUS)
     ! Gray out and disable the first two menu items in the
     !  first (FILE) menu
     result = MODIFYMENUFLAGSQQ (1, 1, $MENUGRAYED)
     result = MODIFYMENUFLAGSQQ (1, 2, $MENUGRAYED)
     END

Parent topic: QuickWin Library Routines

## See Also

APPENDMENUQQ
DELETEMENUQQ
INSERTMENUQQ
MODIFYMENUROUTINEQQ
MODIFYMENUSTRINGQQ