Modifying WM_COMMAND to another app
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hello people, I am trying to catch the WM_COMMAND message of a certain button in an external application. Catching works fine with both WH_CALLWNDPROC and WH_CALLWNDPROCRET hooks. But after the catch I want to WM_NULL it, so the app wont actually execute the function that the button calls. After some browsing through the MSDN, it seems like the WH_GETMESSAGE hook is the only one that can actually modify messages. However, changing my WH_CALLWNDPROC hook to a WH_GETMESSAGE hook resulted in nothing. It seems as if WM_COMMAND never gets processed by WH_GETMESSAGE. It may be that WH_GETMESSAGE is the wrong hook to catch WM_COMMAND, but then how SHOULD I do it? WH_CALLWNDPROC can't modify the message, only inspect it... Thanks, - Fahr