According to Brian Mathis  <[EMAIL PROTECTED]>:

> Just call your ButtonsHandleEvent() function with the incoming event before
> you send it to SysHandleEvent(), like so:
> 
>       EvtGetEvent(&event, evtWaitForever);
>       if (! ButtonsHandleEvent(&event) )      // grab the buttons 
>               if (! SysHandleEvent(&event))

don't forget what is returned :-

and in your ButtonsHandleEvent():

        switch( eventP->eType ) {
        case keyDownEvent:
                switch( eventP->data.keyDown.chr ) {
                case pageUpChr:
                        // do stuff
                return true;    // tell event handler we handled it
                case pageDownChr:
                        // do stuff
                return true;    // tell event handler we handled it
                case hard1Chr:
                        // do stuff
                return true;    // tell event handler we handled it
                case hard2Chr:
                        // do stuff
                return true;    // tell event handler we handled it

                default:
                return false;   // tell event handler to pass it to others



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

Reply via email to