Important: The information in this document is obsolete and should not be used for new development.
HMRemoveBalloon
To remove a help balloon that your application displays using the functionHMShowMenuBalloon, use theHMRemoveBalloonfunction. If your application
does not specify an alternate rectangle to theHMShowBalloonfunction, useHMRemoveBalloonto remove the help balloon you display withHMShowBalloon.
FUNCTION HMRemoveBalloon: OSErr;DESCRIPTION
TheHMRemoveBalloonfunction removes any balloon that is currently visible--unless the user is using Close View and is pressing the Shift key. (This action keeps the help balloon onscreen even while the user moves away from the hot rectangle under Close View.)If you use the
HMShowBalloonfunction to display help balloons, you can either let the Help Manager track the cursor and remove the balloon when the cursor moves out of the hot rectangle, or your application can track the cursor and determine when to remove the balloon. To let the Help Manager track the cursor and remove the balloon when using theHMShowBalloonfunction, specify a rectangle in thealternateRectparameter. If you want your application to track the cursor and remove the balloon when using theHMShowBalloonfunction, specifyNILin thealternateRectparameter. You must then use theHMRemoveBalloonfunction to remove the balloon when the user moves the cursor outside the rectangle.If you use the
HMShowMenuBalloonfunction to display help balloons, you must always track the cursor and use theHMRemoveBalloonfunction to remove the balloon when the cursor moves out of the hot rectangle.
If the user is using Close View and is pressing the Shift key, the help balloon stays onscreen even while the user moves away from the hot rectangle. The
- WARNING
- The
HMRemoveBalloonfunction removes any help balloon that is currently visible, regardless of the application that displayed it. You should callHMRemoveBalloononly when the cursor is in the content area of your application window but not in a hot rectangle, and you should never call it when your application is in the background.![]()
HMRemoveBalloonfunction returns a result code ofhmCloseViewActivein this case.If you use your own menu definition procedure, you should call
HMRemoveBalloonwhen your procedure receives messages about saving or restoring bits. (These messages are described in the chapter "Menu Manager" in Inside Macintosh: Macintosh Toolbox Essentials.)ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theHMRemoveBalloonfunction are
Trap macro Selector _Pack14 $0002 RESULT CODES
noErr 0 No error or the help balloon was removed hmHelpDisabled -850 Help balloons are not enabled hmNoBalloonUp -862 No balloon showing hmCloseViewActive -863 Balloon can't be removed because Close View
is in useSEE ALSO
The description of theHMShowBalloonfunction begins on page 3-93; the description of theHMShowMenuBalloonfunction begins on page 3-96.