[python-win32] HookMessage failure?

b6y9eq902 at sneakemail.com b6y9eq902 at sneakemail.com
Thu Apr 7 04:15:41 CEST 2005


I'm currently trying to detect all clicks to a particular windows application, using win32gui and win32ui.  Right now I'm using EnumWindows() to find the hwnd I want via window title, and then CreateWindowFromHandle(hwnd) to get a PyCWnd object that represents the window.  I then attempt to use HookMessage() to set up a callback for win32con.LBUTTON_DOWN.  However, my callback never gets called.  I know I'm getting the right PyCWnd object, because I can use it to set/get the window title, but for some reason the callback function never gets called.  Any ideas?

Thanks, -Mark

More information about the Python-win32 mailing list