Sets the checked state of a menu item.
Takes userDefinedID (Int) and check (Int).
Returns 1 on success, 0 if item or parent not found.
BGI GUI
Parameters & Returns
Parameters
userDefinedIDInt
checkInt
Returns
Int
Quick Summary
Sets the checked state of a menu item.
Takes userDefinedID (Int) and check (Int).
Returns 1 on success, 0 if item or parent not found.
Technical Exegesis...
Sets the checked state of a menu item identified by userDefinedID. Searches menuMap for the item to find its parentID, then finds the parent submenu. If check is non-zero (true), calls CheckMenuItem with MF_BYCOMMAND | MF_CHECKED to show a checkmark. If check is zero (false), calls CheckMenuItem with MF_UNCHECKED to remove the checkmark. Updates the internal CMenu.IsChecked field. Returns 1 on success, 0 if item or parent not found.
Checked items display a checkmark next to the text.
Sets the checked state of a menu item identified by userDefinedID. Searches menuMap for the item to find its parentID, then finds the parent submenu. If check is non-zero (true), calls CheckMenuItem with MF_BYCOMMAND | MF_CHECKED to show a checkmark. If check is zero (false), calls CheckMenuItem with MF_UNCHECKED to remove the checkmark. Updates the internal CMenu.IsChecked field. Returns 1 on success, 0 if item or parent not found.
Checked items display a checkmark next to the text. Common for toggle options like "Show Toolbar", "Word Wrap", etc. The checkmark appears immediately without needing bgiUpdateWindowMenu. Use bgiIsMenuItemChecked to query the current state. Checked state is independent of enabled state - items can be checked but disabled.