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 / Responding to the User's Choice of a Menu Command


HiliteMenu

You can use the HiliteMenu procedure to highlight or unhighlight menu titles. For example, after performing a menu command chosen by the user, use the HiliteMenu procedure to unhighlight the menu title.

PROCEDURE HiliteMenu (menuID: Integer); 
menuID
The menu ID of the menu whose title should be highlighted. If the menu title of the specified menu is already highlighted, HiliteMenu does nothing. If the menu ID is 0 or the specified menu ID isn't in the current menu list, HiliteMenu unhighlights whichever menu title is currently highlighted (if any).
DESCRIPTION
The MenuSelect and MenuKey functions highlight the title of the menu containing
the item chosen by the user. After performing the chosen task, your application
should unhighlight the menu title by calling HiliteMenu and passing 0 in the
menuID parameter.

The HiliteMenu procedure highlights a menu title by first saving the bits behind the title rectangle and then drawing the highlighted title. HiliteMenu unhighlights a menu title by restoring the bits behind the menu title.

The global variable TheMenu contains the ID of the currently highlighted menu in the menu bar. If the user chooses an item from a submenu, TheMenu contains the menu ID of the submenu, not the menu to which the submenu is attached.

SEE ALSO
To highlight the entire menu bar, use the FlashMenuBar procedure, described on page 3-143.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996