Click to See Complete Forum and Search --> : SetWindowLong with other app's windows
Razzle
Sep 9th, 2000, 07:51 PM
I want to set some kind of a hook to another app's window to capture all WM messages, so I tried SetWindowLong but it didn't work.
I called it with the window's handle but it always returned zero...
V(ery) Basic
Sep 10th, 2000, 05:10 AM
You can't do this in VB alone. You need to put a SetWindowsHookEx in a C++ DLL. A VB DLL won't do, because it is ... <ahem> ... just different.
You can hook all mouse and keyboard movements/presses in VB, but not capture all WM messages.
To find more about SetWindowsHookEx, I have kindly provided a link here (http://msdn.microsoft.com/library/psdk/winbase/hooks_7vaw.htm)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.