Path: utzoo!utgpu!watserv1!watmath!att!att!rutgers!cs.utexas.edu!uunet!microsoft!davidds From: davidds@microsoft.UUCP (David D'SOUZA) Newsgroups: comp.windows.ms.programmer Subject: Re: Hooking onto the mouse Message-ID: <58756@microsoft.UUCP> Date: 3 Nov 90 20:44:32 GMT References: <13430001@hpspcoi.HP.COM> Reply-To: davidds@microsoft.UUCP (David D'Souza) Organization: Microsoft Corp., Redmond WA Lines: 21 Good question... So, why doesn't Windows have a WH_MOUSE hook? Anyway, you have to use a WH_GETMESSAGE hook since all mouse messages are picked up by apps at GetMessage time (and then dispatched to the specific window procedure.) The problem here is that you do take a bit of a performance hit since another function call needs to occur everytime an app does a getmessage. --Dave In article <13430001@hpspcoi.HP.COM> hmolotsi@hpspcoi.HP.COM (Hugh Molotsi) writes: >Hi Windows hackers, > > Does anybody know how to hook onto the Window's mouse driver so >that an application can keep track of mouse messages in the background? >This can be done for the keyboard using SetWindowsHook() and the WH_KEYBOARD >hook (a la Petzold). > > >HNM: "I've fallen and I can't get up!"