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 / Getting and Setting the Menu Bar


GetMenuBar

Use the GetMenuBar function to get a handle to a copy of the current menu list.

FUNCTION GetMenuBar: Handle; 
DESCRIPTION
The GetMenuBar function creates a copy of the current menu list and returns a handle to the copy. You can save the returned menu list and then add menus to or remove menus from the current menu list (using InsertMenu, DeleteMenu, or ClearMenuBar). You can later restore the saved menu list using SetMenuBar.

To release the memory occupied by a saved menu list, use the Memory Manager's DisposeHandle procedure.

WARNING
GetMenuBar doesn't copy the menu records, just the menu list (which contains handles to the menu records). Do not dispose of any menus in a saved menu list if you wish to restore the menu list later.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996