Drivers for 12-key keyboards will ignore the IME mode since there is only one keyboard state.
An IME that supports a QWERTY keyboard should notify the keyboard driver of the desired IME mode.
Applications that are not IME-aware should call SHSetImeMode to set the IME mode to the desired input mode when they gain focus. They should call SHSetImeMode to set the IME mode to SHIME_MODE_NONE when they lose focus.
If the window handle hWnd is not from caller's process and IME is enabled, both SHSetImeMode and SHGetImeMode will fail.