hIMC = ImmAssociateContext(hWnd, NULL); // It makes IME disable for
// hWnd window.
// Then you can do whatever you want without IME.
ImmAssociateContext(hWnd, hIMC); // If you want to enable
// IME again, then you can
// use the previous stored IME
// context(hIMC)
// to restore IME.