EnableMenuItem()
USAGE
void EnableMenuItem(MenuList, MenuNum, ItemNum, SubItemNum, On)
FUNCTION
This routine will enable or disable a MenuItem for you, without you having to
have the MenuItem's address hard coded into your program.
It can be used to alter MenuItems in either the drop down or pop up menu
lists.
Give it the Menu list and the three numbers that identify the intended
MenuItem, and it will find that MenuItem and, depending on the Boolean 'On',
it will set or clear the ITEMENABLED bit in the MenuItem's Flags.
If you wish to access a MenuItem that has subitems, set SubItemNum to
MENUNULL, or -1, and it will update the MenuItem, rather than one of its
subitems.
If you are dealing with a Menu that already installed (with SetMenuStrip),
you can call:
(*functions->EnableMenuItem)(window->MenuStrip, MenuNum, ItemNum,
SubItemNum, On);
INPUTS
Window = Pointer to the linked list of Menu structures
MenuNum = Index of Menu to search in.
ItemNum = Position in menu of the selected MenuItem.
SubItemNum = Position in subitem list of MenuItem. If not desired, set this
to MENUNULL.
On = Boolean flag,
TRUE to enable the MenuItem,
FALSE to disable it.
RESULT
none (void)