Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Using lParam and extracting the keypress data

This topic is 5321 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

Does anyone know how to extract the correct bytes from the lParam for a windows message? I've looked up some MSDN stuff but I'm still not sure how to use it - I need to know whether the key was previously down on the last WndProc call (byte 30) - how do I extract byte number 30 from a dword? [edited by - Charleh on February 28, 2004 1:05:30 PM]

Share this post

Link to post
Share on other sites
Ah right I figured it out, for reference and in case anyone else needs to know,

to get bit 30 from a dword (lParam in this case):

lParam & (1 << 30)


I also don't actually need it in the end, I didn't realise that windows only actually sends 1 WM_KEYDOWN message when you hold the key down until the windows repeat delay timer has expired, and then multiple WM_KEYDOWN messages are sent!

Saves me some time

[edited by - Charleh on February 28, 2004 2:07:42 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!