At 10:16 PM +0100 11-01-00, Chris Antos wrote:
>might we worth trying winExitEvent.
>
>i think your form gets a winExitEvent, but i'm not sure. i'm also not sure
>when else your form would get a winExitEvent.
Well, the thing about winExitEvent is that the event gets created, and will
get returned from the next call to EvtGetEvent, but...
...usually when a form 'pops up' over another, it's because of an app
sublaunch or a modal dialog or something. In that case, the dialog will
have it's own event loop running, so it's that code that gets (and ignores)
the winExitEvent.
That's one of the drawbacks with the current EvtGetEvent event loop design.
I think at some point we'll get rid of that design and switch to using only
an event handler function that the OS calls whenever an event needs to be
processed. If we do it that way, then the winExitEvent will go to the
correct event handler and you can do this in a supported way.
Until then, there's not much you can really do.
Having said that, I can't help but wonder WHY you need to know if a form
has popped up over yours. I suspect you're trying to do something
incorrect. That is, there's probably another way to do what you want that
doesn't require this sort of hacking. Of course, we can't help you with
that because you haven't told us what you're really up to.
--Bob
P.S. A friend of mine used to field a lot of questions like this, and he
had a good analogy. He said people would come to him and ask "How can I
light up the room with this glass of water?"