You have made several mistakes; find all doing comparison. I have also added dialog to demonstrate how process hook messages.
Most significant export, and setting thread ID.
Hook should notify application about events by posting (important!) messages should application act on certain messages. DLL should perform needed filtering itself.
I have defined couple of messages for that reason. You could use RegisterWindowMessage but since we know what window messages are sent I do not think that would be necessary.
There are only 10 types of people in the world: Those who understand binary and those who do not.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.