Jump to content
  • Advertisement
Sign in to follow this  
Demx

Windows Api Input

This topic is 2524 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi ,

i'm trying to use WM_KEYDOWN but i realised that if i keep the key pressed windows sends messages repeatedly about that key being pressed so my code is repeated more times ..
is there a way to tell windows that i want the message only once when the key is pressed ?

hope i made my self clear lol

Share this post


Link to post
Share on other sites
Advertisement
sry i didn't check that there was already a topic.. fixed using if ( (lParam & 0x40000000)==0) {}

Share this post


Link to post
Share on other sites
WM_KEYDOWN (msdn) - bits 0-15 of lParam indicate how many times the message has been sent as a result of holding down the key. When the key is released, it will be 0 on the next send.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!