Jump to content
  • Advertisement

Archived

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

CmdJoeM

How do I capture the value for a pressed key?

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

It''s a while since I have used Win32 for these purposes, but I think WM_KEYDOWN wouldn''t be the prefered way to handle it. It would be better to call TranslateMessage before dispatching messages and then listening for the WM_CHAR message.

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by BitMaster
It''s a while since I have used Win32 for these purposes, but I think WM_KEYDOWN wouldn''t be the prefered way to handle it. It would be better to call TranslateMessage before dispatching messages and then listening for the WM_CHAR message.

I''d agree with that.

John B

Share this post


Link to post
Share on other sites
O.K. this is an MFC program after i use the translate message function how do i use the WM_CHAR i cant figure it out.

Share this post


Link to post
Share on other sites
I don''t know MFC (anymore) nor do I want to relearn it. I assume they have some kind of message handler, but if you could handle WM_KEYDOWN you should be able to figure out for WM_CHAR.

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.

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!