Adds a clickable menu item to a submenu.
Takes subMenu (Int), userDefinedID (Int), and sText (String).
Returns the internal menu ID on success, 0 if submenu not found.
BGI GUI
Parameters & Returns
Parameters
subMenuInt
userDefinedIDInt
sTextString
Returns
Int
Quick Summary
Adds a clickable menu item to a submenu.
Takes subMenu (Int), userDefinedID (Int), and sText (String).
Returns the internal menu ID on success, 0 if submenu not found.
Technical Exegesis...
Adds a clickable menu item (New, Open, Save, etc.) to a submenu. Searches menuMap for the submenu ID, then creates a new CMenu entry with auto-incremented menuIDCount. Stores the user-defined ID (for event identification), parent submenu ID, and display text. Sets menuType to MENU_TYPE_ITEM. Calls AppendMenu with MF_STRING to add the item. Returns the internal menu ID on success, 0 if submenu not found.
Adds a clickable menu item (New, Open, Save, etc.) to a submenu. Searches menuMap for the submenu ID, then creates a new CMenu entry with auto-incremented menuIDCount. Stores the user-defined ID (for event identification), parent submenu ID, and display text. Sets menuType to MENU_TYPE_ITEM. Calls AppendMenu with MF_STRING to add the item. Returns the internal menu ID on success, 0 if submenu not found.
The userDefinedID is YOUR identifier for this item - when clicked, bgiGetEventID returns this value so you can identify which menu item triggered the event. Use unique userDefinedID values for each item. The text is what appears in the menu. Use bgiSetMenuItemText, bgiSetMenuItemChecked, bgiSetMenuItemEnabled to modify the item after creation.