WH_GETMESSAGE doesn’t allow you block a message, but it allows you to change it. LPARAM points to a MSG structure. Just change the message member of that structure to WM_NULL if you don’t want the message to have any effect.