bgiSetMenuItemEnabled

Enables or disables a menu item. Takes userDefinedID (Int) and enable (Int). Returns 1 on success, 0 if item or parent not found.

BGI GUI

Parameters & Returns

Parameters

userDefinedID Int
enable Int

Returns

Int

Quick Summary

Enables or disables a menu item. Takes userDefinedID (Int) and enable (Int). Returns 1 on success, 0 if item or parent not found.

Technical Exegesis...

Sets the enabled state of a menu item identified by userDefinedID. Searches menuMap for the item to find its parentID, then finds the parent submenu. If enable is non-zero (true), calls EnableMenuItem with MF_BYCOMMAND | MF_ENABLED. If enable is zero (false), calls EnableMenuItem with MF_DISABLED to gray out the item. Updates the internal CMenu.isEnabled field. Returns 1 on success, 0 if item or parent not found.

Disabled items appear grayed out and cannot be clicked.

Example

Example.bam
; No example implemented yet