what i want to know is current status of IME.
below is C code to do this
------------ C code ---------------------------
HIMC himc = ImmGetContext(GetSafeHwnd()); BOOL m_bIsHan = ImmGetOpenStatus(himc); ImmReleaseContext(GetSafeHwnd(), himc);------------------------------------------------
i tried to port above to ahk code
------------ ahk code -----------------------------
IME_CheckMode(hwnd) { himc := DllCall("Imm32\ImmGetContext", "UInt", hwnd) ret := DllCall("Imm32\ImmGetOpenStatus", "UInt", himc) DllCall("Imm32\ImmReleaseContext", "UInt", hwnd, "UInt", himc) return ret }-----------------------------------------------------
it always fails at first call. variable himc is always 0.
IME_CheckMode( WinExist("A") )
and
IME_CheckMode( GetChildHWND(WinExist("A"), "Edit1") )
also fail.
any idea?