I think that you can use
SystemParametersInfo[
^] API with action parameter
SPI_SETDEFAULTINPUTLANG
. :)
[UPDATE]
Hi, sorry for the late answer. :(
So, you need an example to change the default input language to English.
Then here is the example:
DWORD hKLEnglUS = 0x00000409;
if(!SystemParametersInfo(SPI_SETDEFAULTINPUTLANG, 0, &hKLEnglUS, SPIF_SENDCHANGE))
TRACE(_T("Error code: %d"), GetLastError());
This works fine for me. :)
As a note I have to tell you that first I've tried using
SystemParametersInfo
with result returned from
LoadKeyboardLayout
but
SystemParametersInfo
failed with error code 998 (Invalid access to memory location).
After that I found that
HKL
is a pointer to
DWORD
that contains the the language identifier.
You can see the language identifiers table in
this[
^]
MSDN page. As you can see from the example I'm using the constant
0x0409 (but with additional zeroes for the
HIWORD
part), which stands for English US.
I hope this helps.
:)
[/UPDATE]