I want to change the input language in WinXP to Spanish, programmatically. Is there an API to support that?
Thanks
I want to change the input language in WinXP to Spanish, programmatically. Is there an API to support that?
Thanks
Not tried myself, according to documentation SetLocaleInfoA (or ...W variant – undecorated alias if relying on UNICODE setting) does the job on system level.
Don't forget to broadcast the WM_SETTINGCHANGE message as documented.
i managed to do it with keyboard events & shortcut assignment.
Note:
if "your app" is an external utility (I wrote mine in Python), then it must NOT invoke a window, otherwise /your-app/ will steal the focus, and will get the language change. in python I solved it by using a GUI-less pyw script filename. (or invoke the script with pythonw.exe)
this article shows how to send keyboard events in python:
https://python-decompiler.com/article/2012-11/how-to-generate-keyboard-events-in-python