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


SystemMenu

The MenuSelect and MenuKey functions call the SystemMenu procedure when the user chooses an item in a menu that belongs to a desk accessory launched in your application's partition. Your application should not need to call the SystemMenu procedure.

PROCEDURE SystemMenu (menuResult: LongInt); 
menuResult
The value that indicates the menu and menu item chosen by the user. The menu ID is in the high-order word, and the menu item is in the low-order word. The menu ID for a menu belonging to a desk accessory is a negative number.
DESCRIPTION
The SystemMenu procedure directs the desk accessory to perform the appropriate action for the given menu item by calling the desk accessory's control routine and passing the accMenu constant in the csCode parameter. The desk accessory should perform the desired action and return. See Inside Macintosh: Devices for more information on desk accessories.

ASSEMBLY-LANGUAGE INFORMATION
If you're writing a desk accessory, you may need to set the MBarEnable global variable to appropriate values. If the MBarEnable global variable is nonzero, then all menus in the current menu bar belong to a desk accessory. If the MBarEnable global variable is 0, then all menus in the current menu bar belong to an application. If you're writing an application, you should not change the value of the MBarEnable global variable.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996