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


Creating Menus

You can use the NewMenu or GetMenu function to create a pull-down menu, although you usually create all the menus in your menu bar at once by providing an 'MBAR' resource and using the GetNewMBar function. See "Getting and Setting the Menu Bar" on page 3-114 for information on creating a menu bar. You typically use the NewMenu or GetMenu function to create submenus or pop-up menus.

The NewMenu function creates a menu with the specified title, assigns it the specified menu ID, and creates a menu record for the menu. Use AppendMenu, InsertMenuItem, AppendResMenu, or InsertResMenu to add items to menus you create with NewMenu.

The GetMenu function creates a menu with the title, items, and characteristics defined in a specified 'MENU' resource.

Both NewMenu and GetMenu allocate space in your application's heap for the menu record and return a handle to the menu's newly created menu record.

To add menus created by NewMenu or GetMenu to the current menu list, use the InsertMenu procedure. To update the menu bar with any new menu titles, use DrawMenuBar.


Subtopics
NewMenu
GetMenu

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996