From f8eecefa2a30f8a90a7dfdff2c300320b30072e4 Mon Sep 17 00:00:00 2001 From: "dougt%meer.net" Date: Tue, 30 May 2006 20:57:07 +0000 Subject: [PATCH] Wince only. Enables IME on windows ce. this is required for any wince application to use IME. bug 297683. r/sr = dveditz --- widget/src/windows/nsWindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 4c55cfbdbfc..fd12830af56 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -4715,10 +4715,26 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT SetWindowPos(hWndSIP, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); } } + { + // Get current input context + HIMC hC = ImmGetContext(mWnd); + // Open the IME + ImmSetOpenStatus(hC, TRUE); + // Set "multi-press" input mode + ImmEscapeW(NULL, hC, IME_ESC_SET_MODE, (LPVOID)IM_SPELL); + } #endif break; case WM_KILLFOCUS: +#ifdef WINCE + { + // Get current input context + HIMC hC = ImmGetContext(mWnd); + // Close the IME + ImmSetOpenStatus(hC, FALSE); + } +#endif WCHAR className[kMaxClassNameLength]; ::GetClassNameW((HWND)wParam, className, kMaxClassNameLength); if (wcscmp(className, kWClassNameUI) &&