Creates a main menu bar for a window.
Takes winID (Int).
Returns the menu ID on success, 0 if window not found.
BGI GUI
Parameters & Returns
Parameters
winIDInt
Returns
Int
Quick Summary
Creates a main menu bar for a window.
Takes winID (Int).
Returns the menu ID on success, 0 if window not found.
Technical Exegesis...
Creates the main menu bar for a BGI window. Searches gizmoMap for the window ID, then creates a new CMenu structure with CreateMenu (Win32 menu bar). Auto-increments menuIDCount for unique ID. Sets menuType to MENU_TYPE_MAIN, gizmoType to GIZMO_MENU. Initializes with isEnabled=true, IsChecked=false. Stores the menu ID and parent window ID in menuMap. Returns the menu ID on success, 0 if window not found.
Creates the main menu bar for a BGI window. Searches gizmoMap for the window ID, then creates a new CMenu structure with CreateMenu (Win32 menu bar). Auto-increments menuIDCount for unique ID. Sets menuType to MENU_TYPE_MAIN, gizmoType to GIZMO_MENU. Initializes with isEnabled=true, IsChecked=false. Stores the menu ID and parent window ID in menuMap. Returns the menu ID on success, 0 if window not found.
The menu is created but not yet attached to the window - call bgiUpdateWindowMenu after adding submenus/items to actually display it. The returned menu ID is used with bgiAttachSubMenu to add dropdown menus (File, Edit, etc.). Each window can have one main menu bar. Menu IDs are separate from gizmo IDs but share same auto-increment pattern.