I am trying to get the Graffiti Manager to process strokes anywhere on
the screen. I found out so far that I can just let the system queue the
pen points, and then I can call GrfProcessStroke. However, sometimes, I
want to force the stroke to be interpreted as a number, no matter where
on the screen it is drawn.
I tried just setting the startPt passed to GrfProcessStroke so it's y
was 170 and its x was 130, but this doesn't help if the stroke is on the
left part of the screen. I next tried setting the GrfSetState numLock
parameter to true, but this seems to be ignored.
* Is there some way to force GrfProcessStroke to interpret the queued
stroke as a digit?
Since I couldn't get that to work, I next tried to dequeue all the
points, and translate them, and enqueue them again. But I keep getting
an error: "Pen q out of sync"
* What am I supposed to do to avoid this error? Here is my code:
int Err;
PointType startPt, endPt, pt;
Err = EvtDequeuePenStrokeInfo (&startPt, &endPt);
while(true) {
Err = EvtDequeuePenPoint (&pt);
MapPointToNumArea(&pt);
Err = EvtEnqueuePenPoint(&pt);
if ((pt.x == -1) && (pt.y == -1)) break;
}
startPt.x = 130;
startPt.y = 170; // try to make it be a number
GrfProcessStroke(&startPt, NULL, false);
Thanks,
Brad Myers
Carnegie Mellon University
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/