Changes the display text of a menu item.
Takes userDefinedID (Int) and text (String).
Returns 1 on success, 0 if item or parent not found.
BGI GUI
Parameters & Returns
Parameters
userDefinedIDInt
textString
Returns
Int
Quick Summary
Changes the display text of a menu item.
Takes userDefinedID (Int) and text (String).
Returns 1 on success, 0 if item or parent not found.
Technical Exegesis...
Changes the display text of a menu item identified by userDefinedID. Searches menuMap for the item with matching userDefinedID to find its parentID. Then searches for the parent submenu. Calls ModifyMenu with MF_BYCOMMAND | MF_STRING to change the item's text while preserving its ID and state. Updates the internal CMenu.text field. Returns 1 on success, 0 if item or parent not found.
Use the same userDefinedID that was passed to bgiAppendSubMenuItem.
Changes the display text of a menu item identified by userDefinedID. Searches menuMap for the item with matching userDefinedID to find its parentID. Then searches for the parent submenu. Calls ModifyMenu with MF_BYCOMMAND | MF_STRING to change the item's text while preserving its ID and state. Updates the internal CMenu.text field. Returns 1 on success, 0 if item or parent not found.
Use the same userDefinedID that was passed to bgiAppendSubMenuItem. Common use case: changing "Undo" to "Undo Delete" or updating item labels based on application state. The menu updates immediately without needing bgiUpdateWindowMenu. Only the text changes - checked and enabled states are preserved.