The TranslateMessage function translates virtual-key messages into character messages. The character messages are posted to the calling thread’s message queue, to be read the next time the thread calls the GetMessage or PeekMessage function.
BOOL TranslateMessage(
CONST MSG *lpMsg |
// address of structure with message |
); |
If the message is translated (that is, a character message is posted to the thread’s message queue), the return value is nonzero.
If the message is WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, or WM_SYSKEYUP, the return value is nonzero, regardless of the translation.
If the message is not translated (that is, a character message is not posted to the thread’s message queue), the return value is zero.
The TranslateMessage function does not modify the message pointed to by the lpMsg parameter.
WM_KEYDOWN and WM_KEYUP combinations produce a WM_CHAR or WM_DEADCHAR message. WM_SYSKEYDOWN and WM_SYSKEYUP combinations produce a WM_SYSCHAR or WM_SYSDEADCHAR message.
TranslateMessage produces WM_CHAR messages only for keys that are mapped to ASCII characters by the keyboard driver.
If applications process virtual-key messages for some other purpose, they should not call TranslateMessage. For instance, an application should not call TranslateMessage if the TranslateAccelerator function returns a nonzero value.
GetMessage, PeekMessage, TranslateAccelerator, WM_CHAR, WM_DEADCHAR, WM_KEYDOWN, WM_KEYUP, WM_SYSCHAR, WM_SYSDEADCHAR, WM_SYSKEYDOWN, WM_SYSKEYUP
file: /Techref/os/win/api/win32/func/src/f88_20.htm, 3KB, , updated: 2000/4/7 11:19, local time: 2024/11/4 21:31,
3.15.141.184:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/os/win/api/win32/func/src/f88_20.htm"> TranslateMessage</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.