diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c index 5ba8371dfd5..354fe0fccb8 100644 --- a/dll/win32/comctl32/edit.c +++ b/dll/win32/comctl32/edit.c @@ -45,6 +45,9 @@ #include "wingdi.h" #include "winuser.h" #include "imm.h" +#ifdef __REACTOS__ + #include +#endif #include "usp10.h" #include "commctrl.h" #include "uxtheme.h" @@ -4973,6 +4976,26 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR /* IME messages to make the edit control IME aware */ case WM_IME_SETCONTEXT: +#ifdef __REACTOS__ + if (FALSE) /* FIXME: Condition */ + lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW; + + if (wParam) + { + HIMC hIMC = ImmGetContext(hwnd); + LPINPUTCONTEXTDX pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); + if (pIC) + { + pIC->dwUIFlags &= ~0x40000; + ImmUnlockIMC(hIMC); + } + if (FALSE) /* FIXME: Condition */ + ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0); + ImmReleaseContext(hwnd, hIMC); + } + + result = DefWindowProcW(hwnd, msg, wParam, lParam); +#endif break; case WM_IME_STARTCOMPOSITION: diff --git a/win32ss/user/user32/controls/edit.c b/win32ss/user/user32/controls/edit.c index ae9814b74bc..c079687e077 100644 --- a/win32ss/user/user32/controls/edit.c +++ b/win32ss/user/user32/controls/edit.c @@ -46,9 +46,13 @@ #define WIN32_LEAN_AND_MEAN #include #ifdef __REACTOS__ +#include #define ImmGetContext IMM_FN(ImmGetContext) #define ImmGetCompositionStringW IMM_FN(ImmGetCompositionStringW) #define ImmReleaseContext IMM_FN(ImmReleaseContext) +#define ImmLockIMC IMM_FN(ImmLockIMC) +#define ImmUnlockIMC IMM_FN(ImmUnlockIMC) +#define ImmNotifyIME IMM_FN(ImmNotifyIME) #endif WINE_DEFAULT_DEBUG_CHANNEL(edit); @@ -5286,6 +5290,26 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP /* IME messages to make the edit control IME aware */ case WM_IME_SETCONTEXT: +#ifdef __REACTOS__ + if (FALSE) /* FIXME: Condition */ + lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW; + + if (wParam) + { + HIMC hIMC = ImmGetContext(hwnd); + LPINPUTCONTEXTDX pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); + if (pIC) + { + pIC->dwUIFlags &= ~0x40000; + ImmUnlockIMC(hIMC); + } + if (GetWin32ClientInfo()->CI_flags & CI_WOW) + ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0); + ImmReleaseContext(hwnd, hIMC); + } + + result = DefWindowProcT(hwnd, WM_IME_SETCONTEXT, wParam, lParam, unicode); +#endif break; case WM_IME_STARTCOMPOSITION: