| menu - menu item handle |
|
Returns 1 if a menu item is enabled, 0 if it is greyed out. Disabled items draw greyed and never produce a $1001 menu-action event, which is how editors keep commands like Save or Delete honest - disable them with DisableMenu while there is nothing to save or delete, enable them again with EnableMenu when there is. MenuEnabled lets you read the current state instead of tracking it in your own variable. Menu items start out enabled. As with all menu state, the window's menu bar shows a change only after UpdateWindowMenu; popup menus pick it up automatically the next time ShowPopupMenu opens them. See also: EnableMenu, DisableMenu, MenuChecked, CreateMenu, UpdateWindowMenu. |