MenuChecked ( menu )
Parameters
| menu - menu item handle |
Description
|
Returns 1 if a menu item is checked, 0 if it is not. Requires Extended language mode. Check marks are the classic way to expose an on/off option in a menu - Show grid, Snap to grid, Wireframe. CheckMenu and UncheckMenu set the state; MenuChecked reads it back so a $1001 menu-action handler can toggle: If MenuChecked(gridMenu) Then UncheckMenu gridMenu Else CheckMenu gridMenu Remember that a window's menu bar only redraws when you call UpdateWindowMenu, so call it after toggling. Popup menus rebuild themselves every time ShowPopupMenu opens them, so they always show the current state. MenuChecked itself reads the logical state, which is correct either way. Menu items start out unchecked. See it working in the menus and events sample. See also: CheckMenu, UncheckMenu, MenuEnabled, CreateMenu, UpdateWindowMenu. |
Index