Jump to content
  • Advertisement
Sign in to follow this  
hello_there

WM_CHAR message

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

I'm using WM_CHAR message to see what character keys are being pressed but no WM_CHAR messages are ever sent. I need it so i can write stuff in my Game. Anyone know why? case WM_CHAR: switch (wParam) { case 0x08:break;// Process a backspace. case 0x0A:break;// Process a linefeed. case 0x1B:break;// Process an escape. case 0x09:break;// Process a tab. case 0x0D:break;// Process a carriage return. default: // Process displayable characters. COGLWindow::GetSingleton().OnChar(wParam); break; }; break; From the WndProc function Am i missing anything?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Tim Cowley
You are remembering to TranslateMessage before dispatching?
Yup, this sounds like a TranslateMessage() issue.

Share this post


Link to post
Share on other sites
Ahh opps i got it working now. But now when i press a key it prints out heaps of that character. How do you do it so that when you do a short press it prints it once and if you hold it down it starts printing heaps. I read on MSDN that lParam has a repeat count or something but i don't know how you suppost to use it.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!