In our app, we do the following:
- on mouse down, we start a separate thread, saving GetCursorPos into an
array;
- we handle n gathered positions on each wm_timer;
- on mouse up, we kill the timer and the thread.
The above algorithm is used to provide smooth results [on not so busy
systems] in opposite to mouse move events and it should solve the "start vs.
end" problem.
Also, there are settings [on some touch pads] to control if it's relative
(as you described) or absolute device. And AFAIK, there are similar settings
even for tablets. In relative coordinates _touching_ left-down and then
right-up corners obviously will not move the cursor.
IMHO, using touch pads for something as complex as signatures may be a tough
task, because of their sizes. But there must be something in Win Tablet
Edition.
Good luck!
Post by NickyHi, Joe, thank you for your reply!
Smooth motion is a problem. And the biggest problem I hit is I don't know
the starting point and ending point of each move by touch pad.
In mspaint, the start point is the point when you press your left mouse key.
But by touch pad, if you touch the left-down corner, and then touch the
right-up corner, the mouse does not move at all. It thinks they are the same
places.
So, what I will get is a continual line. I am afraid they ask me "Are you
sure this is their signature?" hehe!
Post by Joseph M. NewcomerIt's just a pointing device. So all you have to do is track the mouse.
Now the downside: the actual mouse position is apparently not read until
your program asks for the value, something you can see if you simply
handle each OnMouseMove and write the x,y coordinates into an array. You
will not see smooth motion.
On Wed, 17 Nov 2004 10:44:03 -0800, "Nicky"
Post by NickyOur program (VC++) on PDA supports signature. And I am moving the code to
laptop. But it seems impossible to support signature without other hardware
device like "Writing Pad". Does anyone know if it is possible to do signature
with the laptop's touchpad?