--- Aaron Ardiri <[EMAIL PROTECTED]> wrote:
>   instead of:
> 
>     if (!SysHandleEvent(&event))
>       if (!ApplicationHandleEvent(&event))
>       FrmDispatchEvent...
> 
>   do:
> 
>     if (!ApplicationHandleEvent(&event))
>       if (!SysHandleEvent(&event))
>       FrmDispatchEvent...

Or, instead of swapping the lines around, it might be better to let the
system handle everything except the pen events you want first, like:

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

Where IGrabbedThePenEvent() is something like this:

static Boolean IGrabbedThePenEvent( EventType *eventP )
{
  Boolean handled = false;

  if ( (eventP->eType == penDownEvent) &&
    ItsInTheGrafittiArea(eventP->screenX, eventP->screenY) )
  {
    // do whatever, then return true;
    SndPlaySystemSound(sndError);
    handled = true;
  }
  else if ( (eventP->eType = penMoveEvent) &&
    // etc.

  return handled;
}


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.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