[comp.sys.mac.programmer] Balloon Help vs Modeless Dialog in Background

zben@ni.umd.edu (Ben Cranston) (06/27/91)

When I added Balloon Help to my application there appeared a variety of
situations in which several balloons alternated with each other at
essentially event-handling speed.

This application is built upon modeless dialogs.  It appears there are
at least two "gotcha" situations happening.

1.  Idle events passed to IsDialogEvent cause balloon processing for
    modeless dialog items, even if the dialog belongs to a background
    application and even if the dialog is entirely covered up by a
    foreground window.

2.  Window movement in foreground application can cause update events to
    be sent to a background application.  When the background application
    calls IsDialogEvent on the update event, balloon processing occurs.

I addressed item 1 by inhibiting the passing of idle events to IsDialogEvent
when the application is in background.  This seems to work.  I tried
addressing item 2 by specifying the "hmSaveBitsNoWindow" option on the
balloon help resource.  I still get a few cases of two balloons jogging
back and forth in a 1-2-1 pattern (that is, one balloon, a second balloon,
then the first balloon again, which stays).  What is worse, eventually I
get a Bus Fault at StripAddress plus about 400 or so.

Has anybody else seen this problem?