diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c
index 383c293..067d656 100644
--- a/win32ss/user/user32/windows/defwnd.c
+++ b/win32ss/user/user32/windows/defwnd.c
@@ -803,75 +803,6 @@ GoSS:
 }
 
 
-/*
- * helpers for calling IMM32 (from Wine 10/22/2008)
- *
- * WM_IME_* messages are generated only by IMM32,
- * so I assume imm32 is already LoadLibrary-ed.
- */
-static HWND
-DefWndImmGetDefaultIMEWnd(HWND hwnd)
-{
-    HINSTANCE hInstIMM = GetModuleHandleW(L"imm32\0");
-    HWND (WINAPI *pFunc)(HWND);
-    HWND hwndRet = 0;
-
-    if (!hInstIMM)
-    {
-        ERR("cannot get IMM32 handle\n");
-        return 0;
-    }
-
-    pFunc = (void*) GetProcAddress(hInstIMM, "ImmGetDefaultIMEWnd");
-    if (pFunc != NULL)
-        hwndRet = (*pFunc)(hwnd);
-
-    return hwndRet;
-}
-
-
-static BOOL
-DefWndImmIsUIMessageA(HWND hwndIME, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-    HINSTANCE hInstIMM = GetModuleHandleW(L"imm32\0");
-    BOOL (WINAPI *pFunc)(HWND,UINT,WPARAM,LPARAM);
-    BOOL fRet = FALSE;
-
-    if (!hInstIMM)
-    {
-        ERR("cannot get IMM32 handle\n");
-        return FALSE;
-    }
-
-    pFunc = (void*) GetProcAddress(hInstIMM, "ImmIsUIMessageA");
-    if (pFunc != NULL)
-        fRet = (*pFunc)(hwndIME, msg, wParam, lParam);
-
-    return fRet;
-}
-
-
-static BOOL
-DefWndImmIsUIMessageW(HWND hwndIME, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-    HINSTANCE hInstIMM = GetModuleHandleW(L"imm32\0");
-    BOOL (WINAPI *pFunc)(HWND,UINT,WPARAM,LPARAM);
-    BOOL fRet = FALSE;
-
-    if (!hInstIMM)
-    {
-        ERR("cannot get IMM32 handle\n");
-        return FALSE;
-    }
-
-    pFunc = (void*) GetProcAddress(hInstIMM, "ImmIsUIMessageW");
-    if (pFunc != NULL)
-        fRet = (*pFunc)(hwndIME, msg, wParam, lParam);
-
-    return fRet;
-}
-
-
 LRESULT WINAPI
 RealDefWindowProcA(HWND hWnd,
                    UINT Msg,
@@ -1009,8 +940,44 @@ RealDefWindowProcA(HWND hWnd,
             break;
         }
 
-        case WM_IME_STARTCOMPOSITION:
         case WM_IME_COMPOSITION:
+        if (lParam & GCS_RESULTSTR)
+        {
+            LONG size, i;
+            unsigned char lead = 0;
+            char *buf = NULL;
+            HIMC himc = ImmGetContext( hWnd );
+
+            if (himc)
+            {
+                if ((size = ImmGetCompositionStringA( himc, GCS_RESULTSTR, NULL, 0 )))
+                {
+                    if (!(buf = HeapAlloc( GetProcessHeap(), 0, size ))) size = 0;
+                    else size = ImmGetCompositionStringA( himc, GCS_RESULTSTR, buf, size );
+                }
+                ImmReleaseContext( hWnd, himc );
+
+                for (i = 0; i < size; i++)
+                {
+                    unsigned char c = buf[i];
+                    if (!lead)
+                    {
+                        if (IsDBCSLeadByte( c ))
+                            lead = c;
+                        else
+                            SendMessageA( hWnd, WM_IME_CHAR, c, 1 );
+                    }
+                    else
+                    {
+                        SendMessageA( hWnd, WM_IME_CHAR, MAKEWORD(c, lead), 1 );
+                        lead = 0;
+                    }
+                }
+                HeapFree( GetProcessHeap(), 0, buf );
+            }
+        }
+        /* fall through */
+        case WM_IME_STARTCOMPOSITION:
         case WM_IME_ENDCOMPOSITION:
         case WM_IME_SELECT:
         case WM_IME_NOTIFY:
@@ -1018,7 +985,7 @@ RealDefWindowProcA(HWND hWnd,
         {
             HWND hwndIME;
 
-            hwndIME = DefWndImmGetDefaultIMEWnd(hWnd);
+            hwndIME = ImmGetDefaultIMEWnd(hWnd);
             if (hwndIME)
                 Result = SendMessageA(hwndIME, Msg, wParam, lParam);
             break;
@@ -1028,9 +995,9 @@ RealDefWindowProcA(HWND hWnd,
         {
             HWND hwndIME;
 
-            hwndIME = DefWndImmGetDefaultIMEWnd(hWnd);
+            hwndIME = ImmGetDefaultIMEWnd(hWnd);
             if (hwndIME)
-                Result = DefWndImmIsUIMessageA(hwndIME, Msg, wParam, lParam);
+                Result = ImmIsUIMessageA(hwndIME, Msg, wParam, lParam);
             break;
         }
 
@@ -1171,8 +1138,29 @@ RealDefWindowProcW(HWND hWnd,
             break;
         }
 
-        case WM_IME_STARTCOMPOSITION:
         case WM_IME_COMPOSITION:
+        if (lParam & GCS_RESULTSTR)
+        {
+            LONG size, i;
+            WCHAR *buf = NULL;
+            HIMC himc = ImmGetContext( hWnd );
+
+            if (himc)
+            {
+                if ((size = ImmGetCompositionStringW( himc, GCS_RESULTSTR, NULL, 0 )))
+                {
+                    if (!(buf = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) size = 0;
+                    else size = ImmGetCompositionStringW( himc, GCS_RESULTSTR, buf, size * sizeof(WCHAR) );
+                }
+                ImmReleaseContext( hWnd, himc );
+
+                for (i = 0; i < size / sizeof(WCHAR); i++)
+                    SendMessageW( hWnd, WM_IME_CHAR, buf[i], 1 );
+                HeapFree( GetProcessHeap(), 0, buf );
+            }
+        }
+        /* fall through */
+        case WM_IME_STARTCOMPOSITION:
         case WM_IME_ENDCOMPOSITION:
         case WM_IME_SELECT:
         case WM_IME_NOTIFY:
@@ -1180,7 +1168,7 @@ RealDefWindowProcW(HWND hWnd,
         {
             HWND hwndIME;
 
-            hwndIME = DefWndImmGetDefaultIMEWnd(hWnd);
+            hwndIME = ImmGetDefaultIMEWnd(hWnd);
             if (hwndIME)
                 Result = SendMessageW(hwndIME, Msg, wParam, lParam);
             break;
@@ -1190,9 +1178,9 @@ RealDefWindowProcW(HWND hWnd,
         {
             HWND hwndIME;
 
-            hwndIME = DefWndImmGetDefaultIMEWnd(hWnd);
+            hwndIME = ImmGetDefaultIMEWnd(hWnd);
             if (hwndIME)
-                Result = DefWndImmIsUIMessageW(hwndIME, Msg, wParam, lParam);
+                Result = ImmIsUIMessageW(hwndIME, Msg, wParam, lParam);
             break;
         }
 
