Important: The information in this document is obsolete and should not be used for new development.
SystemMenu
TheMenuSelectandMenuKeyfunctions call theSystemMenuprocedure 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 theSystemMenuprocedure.
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
TheSystemMenuprocedure directs the desk accessory to perform the appropriate action for the given menu item by calling the desk accessory's control routine and passing theaccMenuconstant in thecsCodeparameter. 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 theMBarEnableglobal variable to appropriate values. If theMBarEnableglobal variable is nonzero, then all menus in the current menu bar belong to a desk accessory. If theMBarEnableglobal 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 theMBarEnableglobal variable.