TranslateMessage, in response to WM_SYSKEYDOWN messages, generates WM_SYSCHAR messages in a way that is parallel to its processing of WM_KEYDOWN/WM_CHAR. But what is the use of these messages? They cannot be interpreted as the user typing text, and they can also not be interpreted as hotkeys (because that's what WM_SYSKEYDOWN is for). So, what use are they? Does the (always mysterious) DefWindowProc do anything with these messages? What could/should I use them for in my applications (or should they be ignored)?
MSDN's Keyboard Input page, under the heading Character Messages, says the following:
The WM_SYSCHAR message indicates a system character. As with WM_SYSKEYDOWN, you should generally pass this message directly to DefWindowProc. Otherwise, you may interfere with standard system commands. In particular, do not treat WM_SYSCHAR as text that the user has typed.
Which says all that it is not, but fails to specify what could break if DefWindowProc does not get to see these messages? Not to mention that TranslateMessage is not a requirement for a functioning message loop, so DefWindowProc could, I think, not count on these messages being generated.
Related questions 6 What is the WIN32 API WM_REFLECT message for? 1 WM_SYSCOMMAND oddities 1 Why are there functions like WriteProcessMemory available? Related questions 6 What is the WIN32 API WM_REFLECT message for? 1 WM_SYSCOMMAND oddities 1 Why are there functions like WriteProcessMemory available? 7 What does WS_EX_APPWINDOW do? 1 how WM_SYSCHAR is produced? 0 What does this bit of MSDN documentation mean? 6 What is UpdatePerUserSystemParameters? 1 Listen to WM_SYSCOMMAND Events 0 What is the purpose of the system owned top-level windows that have the WS_CHILD style? 1 Meaning of the WM_SYSCOLORCHANGE message Load 7 more related questions Show fewer related questions
Reset to default