Keboard character to localized string
-
How can I translate the keyboard character to the current keyboard layout string? In the method CWnd::OnKeyDown I would like to translate the input character to the non English character - e.g. German. Maybe it is not possible to do it in the OnKeyDown method and I have use rather another method/mechanism, but I don't know which one. Unfotunately the given method always returns me the English character even I switched the keyboard layout to another language. Thanks, Abyss
-
How can I translate the keyboard character to the current keyboard layout string? In the method CWnd::OnKeyDown I would like to translate the input character to the non English character - e.g. German. Maybe it is not possible to do it in the OnKeyDown method and I have use rather another method/mechanism, but I don't know which one. Unfotunately the given method always returns me the English character even I switched the keyboard layout to another language. Thanks, Abyss
Hi I think
LoadKeyboardLayaut
function is helpful for you , you most give yor languge code to this function it change keyboard language.LoadKeyboardLayaut(_T("00000409"),KLF_ACTIVATE); // English LoadKeyboardLayaut(_T("00000429"),KLF_ACTIVATE); // Farsi
Iman Ghasrfakhri -
Hi I think
LoadKeyboardLayaut
function is helpful for you , you most give yor languge code to this function it change keyboard language.LoadKeyboardLayaut(_T("00000409"),KLF_ACTIVATE); // English LoadKeyboardLayaut(_T("00000429"),KLF_ACTIVATE); // Farsi
Iman GhasrfakhriHi, I didn't know this method, but based on MSDN it loads the keyboard layout. I have to play with this maybe it will automatically translates the character to the local character... However user can switch to another languages. How can I catch this event? Or will Windows automatically handle this situation? It only requires to have the keyboard layout loaded to the application? Thanks for your help, Abyss