I've got a case where I'm receiving asynchronous launches from incoming
paging messages on a PagerCard. When I get a page, all I do is stuff it in
a database. They, if my application is already active, I want to update an
onscreen message counter. If it's not, I just want to go back to what was
happening bevore.

When my application is launched upon receipt of a page, I do the following:

        case PageLaunchCmdMessageReceived:
                pIndex = ( ULongPtr ) cmdPBP;
                index = *pIndex;
                ProcessMessage ( index );
        break;

The first two executable statements in ProcessMessage are

        Word      frmID = FrmGetActiveFormID ();
        FormPtr frmP = FrmGetActiveForm ();

What's interesting is that, if I switch to the application launcher, or to
another application, receive a page, and then execute the above code, frmID
is set to the ID# of my main form, 1000, even though I haven't done any
form-related calls and I wasn't the active application. Further examination
of frmP reveals that it also says that my main form is the active form, and
the usable and visible attributes are set for it. It seems as though my GUI
is getting activated, even though I'm doing nothing to activate it.

Would anyone have any explanation for how/why this might be happening? More
importantly, is there any way I can accurately and effectively determine
that I was in fac _not_ the active application when I receive a page?
Checking the GUi seems fraught with problems. Thanks in advance.

Regards,
Steve Mann

-------------------------------------------
Creative Digital Publishing Inc.
1317 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.788.0138              805.593.3811 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com


Reply via email to