Menu item check clause¶
[[window_id.]menu_id.]item_id->check = ON | OFF
This clause can be used at run time to add or remove a tick or bullet point from a menu item. Such an item is normally a toggle-type option; selecting the item toggles it from selected to unselected or vice versa. Such options are commonly used to allow users to define preferences for the program environment (e.g. help captions on or off).
A checked option is marked by either a tick or a bullet point positioned to the left of the item label. The default marker is a tick. To use a bullet point, assign the style flag WS_BULLET to the menu item.
If a top-level item (i.e. one on the main menu bar) is checked, there is no visible indication.
This clause can also be used to test whether an item is currently checked:
if item_id->check = ON | OFF…
The style flag WS_CHECKED has identical functionality to the check clause.
RELATED TOPICS |