|
-
Apr 25th, 2000, 11:22 AM
#1
Thread Starter
Fanatic Member
How do I make the mouse move in steps of some pixels so that it moves only over the grid drawn on the picture?
-
Apr 25th, 2000, 04:18 PM
#2
transcendental analytic
You could try Setcursorpos and getcursorpos API
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Apr 25th, 2000, 08:25 PM
#3
Thread Starter
Fanatic Member
Can you please supply me the code. It would be very helpful to me.
Thanks.
Kinjal
-
Apr 25th, 2000, 08:29 PM
#4
Thread Starter
Fanatic Member
Can you please supply me the code since I dont have any resources (like MSDN or any Books) to find out the syntax required for the Setcursorpos and getcursorpos API. My grid points are at 150 pixels apart an I want the mouse cursor to only move on these grid points.
Thanks
Kinjal
-
Apr 26th, 2000, 03:18 AM
#5
transcendental analytic
Code:
Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long
Type POINTAPI
x As Long
y As Long
End Type
Well you could try a little by yourself
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|