Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Any pointers on how accented characters are implemented on Windows would be helpful.

Goal - Ability to add accented characters(áéíóú) using keystrokes like ctrl + ' followed by a vowel and all other combinations that work on standard applications like MS Word, Text pad etc.

My Findings till date - Everywhere I could read documentation/blogs/forums related to WM_DEADCHAR message.What I understand is : ::TranslateMessage translates WM_KEYUP messages corresponding to dead keys into WM_DEADCHAR messages, and it translates WM_SYSKEYUP messages generated by dead keys into WM_SYSDEADCHAR messages. Windows provides the logic that combines these messages with character messages to produce accented characters, so dead-key messages are usually passed on for default processing.

I added this message to my CWnd derived class's message map but OnDeadChar() never gets called. Additionally I have found out using SPY++ that even in MSWord,Textpad etc where accented characters could be added with combination of these keystrokes, WM_DEADCHAR message is never dispatched. So, Does this mean that WM_DEADCHAR is actually not the way to address this issue?

Please provide any sample code/steps/mechanism to implement accented characters.

Thanks in advance!!!
Posted

1 solution

3 ideas :

- Have your software support unicode and/or wide char.
- Have your clients (the one who use your software) insstall and use the different keyboard layouts.
- Have your application support the Windows IME (input method, http://msdn.microsoft.com/en-us/library/windows/desktop/dd318170%28v=vs.85%29.aspx[^] )

Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900