I've looked at the GUI tuts and searched this forum, but I can't find a way to add a simple checkmark/tick to a menu item, where you can click on a menu item to turn it on/off like the "Show percentages", "100% panes" in this image.

How would I add that option to a simple menu system and how can I check whether the menu item is checked/unchecked?
I looked at the MaxGUI command Un/CheckMenu, but I'm not sure if this is what I need - or am I wrong? I've tried without success to use it.
Here is a basic framework
I want the (in this example) "AutoSave" option to be toggled by the user.

How would I add that option to a simple menu system and how can I check whether the menu item is checked/unchecked?
I looked at the MaxGUI command Un/CheckMenu, but I'm not sure if this is what I need - or am I wrong? I've tried without success to use it.
Here is a basic framework
Import maxgui.drivers Global MyWindow:TGadget Global filemenu:TGadget MyWindow=CreateWindow("Tick/Check test", 112,84,200,200) filemenu=CreateMenu("&File",0,WindowMenu(MyWindow)) CreateMenu "New", 101,filemenu CreateMenu "Open ", 102,filemenu CreateMenu "AutoSave", 103,filemenu CreateMenu "Exit", 104,filemenu UpdateWindowMenu MyWindow While True WaitEvent Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_MENUACTION Select EventData() ' AutoSave Case 103 ' Basic tick toggle routine ' Exit Case 104 End End Select End Select Wend
I want the (in this example) "AutoSave" option to be toggled by the user.