You cannot do that actually because you do not get the message before windows and they relay the event to your program