|
-
May 27th, 2000, 10:31 PM
#1
Thread Starter
Guru
Blah. I am creating an application, and I need to move the mouse cursor and at the same time know when the mouse itself has been moved. So I figure, it would be neat if I moved the cursor with SetCursorPos and then used a system-scope WH_MOUSE hook to know when the mouse itself was moved, clicked, wheel-rolled, etc.
Only problem is, as you can already guess, you need a DLL library to use system-scope hooks. And I don't have anything which can create that. Except, oh no, anything but that, Visual C++.
I don't know that language very well, and I haven't used it in quite some time, so... Could anyone please help me with the code?
I need something like this:
Code:
Public Declare Function GetAddressOfMouseProc Lib "MySqueezyDLL" () As Long
Public Declare Function GethInstanceOfMySqueezyDLL Lib "MySqueezyDLL" () As Long
Public Declare Sub InitializeDLL Lib "MySqueezyDLL" (ByVal hAddressOfMySqueezyCallbackRoutine As Long)
Public Sub MySqueezyCallbackRoutine()
' This is just a callback routine that doesn't need to return anything or receive any values
' It's just a notification OK???
End Sub
Inside the DLL would be a cute little MouseProc that would just call MySqueezyCallbackRoutine and return the value returned by CallNextHookEx... I don't need anything fancier!
-
May 29th, 2000, 02:06 AM
#2
Thread Starter
Guru
Go on, go on...
Reply! I know you have a valid and helpful answer!!!
-
May 29th, 2000, 03:25 AM
#3
I can't help you with the C stuff, but if you only want to capture Mouse movements, you could use a journal hook. This is the only system wide hook that doesn't have to live in a C dll, so you can use it with vb.
Have a look at this post:
http://forums.vb-world.net/showthrea...threadid=15494
-
May 29th, 2000, 03:44 AM
#4
Thread Starter
Guru
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
|