Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 3 - Menu Manager / Menu Manager Reference
Menu Manager Routines / Managing Entries in the Menu Color Information Table


DeleteMCEntries

Use the DeleteMCEntries procedure to delete one or all entries for a specific menu from your application's menu color information table. You can delete a menu item entry, a menu title entry, the menu bar entry, or all menu item entries of a specific menu. The DeleteMCEntries procedure is also available as the DelMCEntries procedure.

PROCEDURE DeleteMCEntries (menuID: Integer; menuItem: Integer); 
menuID
The menu ID that the DeleteMCEntries procedure should use to determine which entry to delete from the menu color information table. Specify 0 in the menuID parameter (and the menuItem parameter) to delete the menu bar entry. Specify the menu ID of a menu in the current menu list in the menuID parameter and 0 in the menuItem parameter to delete a specific menu title entry. Specify the menu ID of a menu in the current menu list in the menuID parameter and an item number in the menuItem parameter to delete a specific menu item entry.
menuItem
The menu item that the DeleteMCEntries procedure should use to determine which entry to delete from the menu color information table. If you specify 0 in this parameter, DeleteMCEntries deletes either the menu bar entry or menu title entry, depending on the value of the menuID parameter. If you specify the item number of a menu item in this parameter and the menu ID of a menu in the current menu list in the menuID parameter, DeleteMCEntries deletes a specific menu item entry. You can also delete all menu item entries for a specific menu from your application's menu color information table using this constant:
CONST
mctAllItems = -98; {delete all menu item entries }
{ for the specified menu}
DESCRIPTION
The DeleteMCEntries procedure deletes a menu bar entry, a menu title entry, a menu item entry, or all menu item entries of a given menu, according to the values specified in the menuID and menuItem parameters. If the GetMCEntry function does not find the specified entry in your application's menu color information table, it does not delete the entry. Your application should not delete the last entry in your application's menu color information table.

If any of the deleted entries changes the menu bar color or a menu title color, your application should call DrawMenuBar to update the menu bar.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996