I want to use WH_GETMESSAGE or any other type of global hook to get the WM_MOUSEWHEEL message from other program.
However, none of them seems to work.
Currently, I am using WH_GETMESSAGE as my hook type, and in hook procedure, i have
if (pMsg->message == WM_MOUSEWHEEL)
// Do something here
this only works when i try to use wheel in my program; the program does not seem to get the wheel message from any other program.
I do not know if this is because the code is wrong, or just because other application does not fire WM_MOUSEWHEEL message.
If i check WM_LBUTTONDOWN instead of WM_MOUSEWHEEL, the program works fine.
If i use SPY++ to monitor other programs (like notepad), it seems like it ignores WM_MOUSEWHEEL or something.
Is there any way to get the WM_MOUSEWHEEL message or force other program to fire the message?