Thanks for that API function. I'm not using a form handler though... I'm running an interface simulation for what will become an embedded handheld device. I'm using screen taps to mock the keypresses of what will be the keypad on the handheld. For example, if the user presses the numeric '1' key on our keypad, that would approximate to a region around 15,80 on the digitizer. Interesting project I have here!
"Joe Malone" <[EMAIL PROTECTED]> wrote in message news:88722@palm-dev-forum... > > > On Wed, 12 Jun 2002, Curt Allen wrote: > > > I was using penx() and peny() in PocketC to acquire the coords > > > of a screen tap. Now I'm using CW8.0 and I can't seem to > > > figure out how to get these coords. Any help? > > --- Aaron Ardiri <[EMAIL PROTECTED]> wrote: > > EvtGetPen(&penX, *penY, *penDown); > > That's rather sloppy cutting and pasting, az! > > The prototype for EvtGetPen() is: > > void EvtGetPen (Int16 *pScreenX, Int16 *pScreenY, Boolean *pPenDown); > > So, you would use something like this: > > Int16 ScreenX, ScreenY; > Boolean PenDown; > EvtGetPen(&ScreenX, &ScreenY, &PenDown); > > However, most of the time, you want to get the coords when you receive > a tap on the screen, not just at any random time. To do that, you > should add code like this to your form event handler: > > case penDownEvent: > // eventP is the EventPtr passed to your form event handler > ScreenX = eventP->screenX; > ScreenY = eventP->screenY; > // <code to do whatever else you want here> > handled = false; // to let controls handle their pen events > break; > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
