Posted: Sat Aug 16, 2008 12:57 pm Post subject: PostMessage Sending Twice ?
I was under the impression that with windows messages for key presses, I would have to send a WM_KEYDOWN and then a WM_KEYUP but I found that when I did this, the 2 messages that were put onto the message queue resulted in the message being sent twice ?!
For example, if I send the letter 'a' to notepad with the above method, it weirdly results in notepad displaying 'aa' and so on. It works perfectly once I remove the WM_KEYUP but I just find it a bit odd. Surely when a key is pressed (at a hardware level) two messages are sent to the message queue then ?
Well the call to KEYUP is directly after the call to KEYDOWN. I just figured that when you press a key by hand that is what happens, key goes down then back up. I will try your suggestion then.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum