Skip to content

Instantly share code, notes, and snippets.

@rzl24ozi
Last active May 20, 2018 12:55
Show Gist options
  • Save rzl24ozi/c71c668ad0ff52caead0706ec630ecc7 to your computer and use it in GitHub Desktop.
Save rzl24ozi/c71c668ad0ff52caead0706ec630ecc7 to your computer and use it in GitHub Desktop.
disable w32-ime by using ImmDisableIME()
--- ./src/w32fns.c.orig 2018-01-09 05:23:58.000000000 +0900
+++ ./src/w32fns.c 2018-04-10 23:10:38.166459500 +0900
@@ -11058,6 +11058,9 @@
{
HMODULE imm32_lib = GetModuleHandle ("imm32.dll");
+ BOOL (WINAPI * disable_ime_fn) (DWORD) = (BOOL (WINAPI *) (DWORD))
+ GetProcAddress (imm32_lib, "ImmDisableIME");
+ if (disable_ime_fn) disable_ime_fn (-1);
get_composition_string_fn = (ImmGetCompositionString_Proc)
GetProcAddress (imm32_lib, "ImmGetCompositionStringW");
get_ime_context_fn = (ImmGetContext_Proc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment