The GetKeyboardLayout function retrieves the active keyboard layout for a specified thread. If the dwLayout parameter is zero, the layout for the active thread is returned.
HKL GetKeyboardLayout(
DWORD dwLayout // thread identifier
);
The return value is the keyboard layout handle for the thread. The low word contains a language identifier for the input language and the high word contains a device handle for the physical layout of the keyboard.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Keyboard Input Overview, Keyboard Input Functions, ActivateKeyboardLayout, CreateThread, LoadKeyboardLayout