Important: The information in this document is obsolete and should not be used for new development.
GetMenuBar
Use theGetMenuBarfunction to get a handle to a copy of the current menu list.
FUNCTION GetMenuBar: Handle;DESCRIPTION
TheGetMenuBarfunction 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 (usingInsertMenu,DeleteMenu, orClearMenuBar). You can later restore the saved menu list usingSetMenuBar.To release the memory occupied by a saved menu list, use the Memory Manager's
DisposeHandleprocedure.
- WARNING
GetMenuBardoesn'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.![]()