Reputation: 461
I know that I can use the GetKeyboardLayout function in order to retrieve the current keyboard language. However I am still confused on how to use the return value of this function.
Can someone write down a practical example on how to use it, for example, to check if keyboard is set to English language? (I'm using C++)
Thank you in advance.
Upvotes: 0
Views: 717
Reputation: 461
Found solution!
HKL KeyboardLayout = GetKeyboardLayout(0);
if (PRIMARYLANGID(KeyboardLayout) == LANG_ENGLISH)
Upvotes: 1