stupid question
Is it neccessary to use TranslateMessage() if you're only interested in WM_KEYDOWN and WM_KEYUP messages ?
Thanks
BlackHC
I do know that I don't know anything.
[edited by - BlackHC on April 18, 2003 1:56:23 PM]
That's not an answer !
I do know that this function in normally in the message loop, but is there any difference if I don't use TranslateMessage() in the MESSAGE LOOP when I'm only interested in WM_KEYDOWN and WM_KEYUP messages ?
BlackHC
I do know that I don't know anything.
[edited by - BlackHC on April 18, 2003 1:56:34 PM]
I do know that this function in normally in the message loop, but is there any difference if I don't use TranslateMessage() in the MESSAGE LOOP when I'm only interested in WM_KEYDOWN and WM_KEYUP messages ?
BlackHC
I do know that I don't know anything.
[edited by - BlackHC on April 18, 2003 1:56:34 PM]
Here's a brilliant idea for you:
Why don't you try it and see! Just think, 2 minutes of coding could give you the answer to all your questions! Isn't it ingenious?
If that's too much effort, you could read the MSDN docs to see exactly what the function does, and think for yourself whether it's necessary or not.
[edited by - micepick on April 18, 2003 12:12:03 PM]
Why don't you try it and see! Just think, 2 minutes of coding could give you the answer to all your questions! Isn't it ingenious?
If that's too much effort, you could read the MSDN docs to see exactly what the function does, and think for yourself whether it's necessary or not.
[edited by - micepick on April 18, 2003 12:12:03 PM]
1. That wouldnt be just 2 minutes for me :-/
2. Yes - I looked into MSDN docs what this function and the rest of them in the message queue do.
3. And yes, I''ve also tested it and it works.
I wantet just to know if anyone perhaps knows whether there is such tricky stuff with keyboard messages like with mouse messages for example.
Well, this post wasn''t very intelligent, I do know. But I just thought that I could also post once such a question like lots of people post here every day.
BlackHC
I do know that I don''t know anything.
2. Yes - I looked into MSDN docs what this function and the rest of them in the message queue do.
3. And yes, I''ve also tested it and it works.
I wantet just to know if anyone perhaps knows whether there is such tricky stuff with keyboard messages like with mouse messages for example.
Well, this post wasn''t very intelligent, I do know. But I just thought that I could also post once such a question like lots of people post here every day.
BlackHC
I do know that I don''t know anything.
You only need to use TranslateMessage if you want to check for WM_CHAR messages instead of certain combinations of WM_KEYDOWN and WM_KEYUP. There''s a similar function TranslateAccelerator that turns key press messages into menu commands.
The only similar thing for mice is client-area coordinates (relative to the top left corner of your application''s drawing area) are used in some places such as WM_MOUSE* messages, and screen coordinates (relative to the top left corner of the screen) are used in others such as the GetCursorPos function. Sometimes you need to translate between the two with the functions ScreenToClient and ClientToScreen.
The only similar thing for mice is client-area coordinates (relative to the top left corner of your application''s drawing area) are used in some places such as WM_MOUSE* messages, and screen coordinates (relative to the top left corner of the screen) are used in others such as the GetCursorPos function. Sometimes you need to translate between the two with the functions ScreenToClient and ClientToScreen.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement