Enabling/Disabling Items

Disabling an item is achieved using the WinEnableMenuItem() function. Figure "Disabling an Menu Bar/Pulldown Menu Item" shows how to disable the menu bar item MI_VIEW.

Enabling an item is achieved with the same message class, but FALSE is specified as the last attribute in the WinEnableMenuItem() function call.

Note that the WinEnableMenuItem() function is new in OS/2 Version 2.0; previous versions of OS/2 required use of the WinSendDlgItemMsg() function to send an MM_SETITEMATTR message to the menu.


[Back: Inserting/Deleting Menu Bar Items]
[Next: Indicating Selected Items]