|
-
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!
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
|