I've copied this excerpt from the subhunt code listed
below, but it's not working. I've also added code
elsewhere to handle the keyDownEvents, but that part
doesn't matter at this point because the code below
isn't catching it, and when I hit a hardward button
it's simply switching apps, like it normally does.

Also, where can I look at the various header files,
like KeyMgr.h? I've been looking through various
documentation like the Palm OS Reference and can't
find it. 

Thanks

static void AppEventLoop(void)
{
    UInt16 error;
    EventType event;

    do {
        // change timeout if you need periodic
nilEvents
        EvtGetEvent(&event, evtWaitForever);

                // Intercept the hard keys to prevent them from
switching apps
                if (event.eType == keyDownEvent && 
                        (event.data.keyDown.chr == keyBitHard2 ||
                         event.data.keyDown.chr == keyBitHard3 ||
                         event.data.keyDown.chr == pageUpChr ||
                         event.data.keyDown.chr == pageDownChr ) )
                        {
                        continue;
                        }
                        

        if (! SysHandleEvent(&event))
        {
            if (! MenuHandleEvent(0, &event, &error))
            {
                if (! AppHandleEvent(&event))
                {
                    FrmDispatchEvent(&event);
                }
            }
        }
    } while (event.eType != appStopEvent);
}

__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to