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 / Initializing the Menu Manager


InitProcMenu

Apple recommends that you use the standard menu bar definition function. However, if your application provides its own menu bar definition function, use the InitProcMenu procedure to set the mbResID field of the current menu list to the resource ID of your custom 'MBDF' resource.

PROCEDURE InitProcMenu (resID: Integer); 
resID
The resource ID of your application's menu bar definition function in the upper 13 bits of this parameter; the variant in the lower 3 bits. You must use a resource ID greater than $100.
For resources of type 'MBDF', Apple reserves resource IDs $000 through $100 for its own use.
DESCRIPTION
The InitProcMenu procedure creates the current menu list if it hasn't already been created by a previous call to InitMenus. The InitProcMenu procedure stores the resource ID that you specify in the mbResID field of the current menu list. The Menu Manager uses the menu bar definition function referred to in this field to draw the menu bar and to perform basic operations on menus.

SPECIAL CONSIDERATIONS
The resource ID of your application's menu bar definition function is maintained in the current menu list until your application next calls InitMenus; InitMenus initializes the mbResID field with the resource ID of the standard menu bar definition function. This can affect applications such as development environments that control other applications that may call InitMenus.

SEE ALSO
See the description of the InitMenus procedure on page 3-105; you should use InitMenus if your application uses the standard menu bar definition function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996