Important: The information in this document is obsolete and should not be used for new development.
SystemMenu
TheMenuSelect
andMenuKey
functions call theSystemMenu
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 theSystemMenu
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
TheSystemMenu
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 theaccMenu
constant in thecsCode
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 theMBarEnable
global variable to appropriate values. If theMBarEnable
global variable is nonzero, then all menus in the current menu bar belong to a desk accessory. If theMBarEnable
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 theMBarEnable
global variable.