I'm investigating using hooks for the first time. I've been successful
in installing system wide hooks for filtering messages, but I've had
some trouble with local hooks. I've created a DLL that has a function
to call SetWindowsHookEx and I call this function from another program
and pass the threadId of the thread I want to hook into (I find this by
enumerating the windows and then using GetWindowThreadProcessId when I
find the one I want.) This DLL also has the callback function. As a
test I started up the calculator program and tried to install the
various hooks on it. So far, all I can get to work are WH_KEYBOARD and
WH_MOUSE. The callback is not called for the other hooks. If I
install a system wide hook, the calculator will call the callback
function so I know it can process these messages. Any ideas on why
this could be happening?