Please provide MFC SetWindowsHookEx WH_GETMESSAGE Example
Posted on 1999-08-04
I have been having terrible difficulties getting my WH_GETMESSAGE hook to work properly as a system hook. I've tried so many different things and fixed so many problems along the way - it seems the road will never end!
I am trying to write an MFC App which installs a WH_GETMESSAGE hook in order to catch WM_PAINT messages that target windows other than my app's.
Please send complete compilable C++ source code for an MFC app and the hook dll which demonstrates installation of a WH_GETMESSAGE hook using SetWindowsHookEx. The code should successfully catch WM_PAINT messages that are destined for other applications.
I've been struggling with this issue for many weeks (on a side-project) and really want it resolved soon, that's why the point value is so high. Any working code is acceptable - I will be reimplementing my own solution.