Posted on 1997-10-12
I tried to install a systemwide mousehook with
SetWindowsHookEx(WH_MOUSE, MouseHookCallBack, HInstance, 0)
inside a DLL. According to any articles I read about hooking this usually installs a systemwide mousehook, but it does not!
I use the DLL from my application, both coded with Delphi3. Inside the DLL all mouseevents are filtered and if there is the right one, a WM_USER message is posted to my application to inform it of the event.
But this only recognizes mouseevents on the application's form and not on the desktop or somewhere else.
Is there any other way than using a DLL and hook procedures?
I tried to subclass the desktop window, but it does not work (as I read later). I think I declared everything as it should be (export and stdcall).
I saw several applications that are obviously able to receive systemwide events, but I did not manage.
Thanks in advance,