However, I seem to remember (and it's been awhile) that with certain commands, once 
the command is generated, it is still too late
to stop it from occurring because you are simply being notified, as opposed to 
triggering the event.

In that case, just get the location of the silk button arrays from the 
EvtEnumSilkSomething command (sorry can't remember off hand),
compare the region with vhrFind, or whichever you want to intercept, and then check on 
a penDown event for it being  in that
rectange.  If it is, instead of passing that penDown to the system, call your special 
function.

Richard Burmeister wrote:

> > From: Ng Wei Gee
> >
> > I would like to trap the Calc and Find buttons to do some
> > application-specific functions. How can I do that? I would like to use
> > pre-OS3.5 calls as I want to maintain compatibility with OS3.0 devices.
> > Thanks in advance!
> >
>
> >From the knowledge base:
>
> "It's easy to tweak your event loop to ignore the buttons. When you get the
> keyDownEvent, if event.data.keyDown.chr is between hard1Chr and hard4Chr, or
> is findChr or any of the other characters you want to ignore (all defined in
> Chars.h), then ignore the event and don't let the system handle it."
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


-- 
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