Checks or unchecks the menu item.
A menu item's check state can be changed by the user selecting the item, and such changes do not go through this method; use the menu item callback procedure (provided as an initialization argument) to monitor check state changes.