Important: The information in this document is obsolete and should not be used for new development.
OpenDeskAcc
You can use theOpenDeskAcc
function to open an item in the Apple menu.
pascal short OpenDeskAcc(ConstStr255Param deskAccName);
deskAccName
- A Pascal string containing the name of the Apple menu item.
DESCRIPTION
TheOpenDeskAcc
function opens the Apple menu item specified by thedeskAccName
parameter. If the item is already open, theOpenDeskAcc
function schedules it for execution and returns to your application. Otherwise, it prepares to open the item. In either case, your application receives a suspend event and the selected item is brought to the foreground.You should ignore the value returned by
OpenDeskAcc
. If the menu item is a desk accessory and is successfully opened, the function result is a driver reference number for the desk accessory driver. Otherwise the function result is undefined. The desk accessory is responsible for informing the user of any errors.Because some older desk accessories may not reset the current graphics port before returning, you should bracket your call to
OpenDeskAcc
with calls to the QuickDraw proceduresGetPort
andSetPort
, to save and restore the current port.SPECIAL CONSIDERATIONS
TheOpenDeskAcc
function may move memory; you should not call it at interrupt time.SEE ALSO
For information about closing a desk accessory, see the description of theCloseDeskAcc
function beginning on page 1-68.