mouse hooking
-
:) Hi, I have a stylus (pen) whose coordinates are different from mouse coordinates. I tried to differentiate the ratios but the stylus coordinates differ by mouse in speed , position and time. I thought of mouse hooking. Like OnmouseMove() i have stylus OnMove() (sdk) , i thought if i could send the points generated by stylus in OnMove() to the mouse callback function it should work,and i tried it i get assertions. Is there any way i could map this stylus to mouse. Thanx in advance.:confused: ragiz
-
:) Hi, I have a stylus (pen) whose coordinates are different from mouse coordinates. I tried to differentiate the ratios but the stylus coordinates differ by mouse in speed , position and time. I thought of mouse hooking. Like OnmouseMove() i have stylus OnMove() (sdk) , i thought if i could send the points generated by stylus in OnMove() to the mouse callback function it should work,and i tried it i get assertions. Is there any way i could map this stylus to mouse. Thanx in advance.:confused: ragiz
:confused:What does speed have to do with it? It all has to do with coordinates, which may have to be translated from one coordinate system to anouther. (Sounds like a math problem!) :confused:What mouse callback function? (Not OnMouseMove()) Ok! In order for someone to answer your question. 1) What is the difference between the stylus and mouse coordinates? 2) What do you mean by "differ by mouse in speed, position and time"? (This is not physics!) INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen
-
:confused:What does speed have to do with it? It all has to do with coordinates, which may have to be translated from one coordinate system to anouther. (Sounds like a math problem!) :confused:What mouse callback function? (Not OnMouseMove()) Ok! In order for someone to answer your question. 1) What is the difference between the stylus and mouse coordinates? 2) What do you mean by "differ by mouse in speed, position and time"? (This is not physics!) INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen
What does speed have to do with it? The stylus which i have( uses laser )generates lots of coordinates when written slowly. if u keep the pen still it generates alot of points while mouse generates only one point. What mouse callback function? (Not onmousemove()) is the mouse hooking ( WH_JOURNALPLAYBACK )which plays the mouse move which was recorded earlier. Just tell me is it possible to map these two by any means. Thanx for reply :confused: rajiz
-
What does speed have to do with it? The stylus which i have( uses laser )generates lots of coordinates when written slowly. if u keep the pen still it generates alot of points while mouse generates only one point. What mouse callback function? (Not onmousemove()) is the mouse hooking ( WH_JOURNALPLAYBACK )which plays the mouse move which was recorded earlier. Just tell me is it possible to map these two by any means. Thanx for reply :confused: rajiz
I've did a little reading, this time> Both WH_JOURNALPLAYBACK and WH_JOURNALRECORD are global for record and play back, they are probably not of much use for you purposes. The MouseProc is application-defined, but it is only called after a mouse message is generated, and again does not seem to be what you need. You may be able to have the DLL send mouse messages directly to your application, based on the stylus position. If the resolution of the stylus is higher than the mouse resolution (which it sounds like it is), then you will have to calculate the relitive screen position from the given stylus position. If the relitive screen position changes: 1) save the position as current position and 2) Post (recommended) a mouse message to the application. You should only need to post a new message if the relitive mounse position changes; that is if the new calculated pixel position does not equal current position. There should be some articles on posting mouse messages, some where. I do not know if any of that helps, but my times up. Good Luck! INTP "The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes." Andrew W. Troelsen