return hIMC;
dwValue = NtUserAssociateInputContext(hWnd, hIMC, 0);
- if (dwValue == 0)
- return hOldIMC;
- if (dwValue != 1)
- return NULL;
-
- hwndFocus = (HWND)NtUserQueryWindow(hWnd, QUERY_WINDOW_FOCUS);
- if (hwndFocus == hWnd)
+ switch (dwValue)
{
- ImmSetActiveContext(hWnd, hOldIMC, FALSE);
- ImmSetActiveContext(hWnd, hIMC, TRUE);
- }
+ case 0:
+ return hOldIMC;
- return hOldIMC;
+ case 1:
+ hwndFocus = (HWND)NtUserQueryWindow(hWnd, QUERY_WINDOW_FOCUS);
+ if (hwndFocus == hWnd)
+ {
+ ImmSetActiveContext(hWnd, hOldIMC, FALSE);
+ ImmSetActiveContext(hWnd, hIMC, TRUE);
+ }
+ return hOldIMC;
+
+ default:
+ return NULL;
+ }
}
/***********************************************************************
}
/* Converts the character index */
+/* Win: CalcCharacterPositionAtoW */
LONG APIENTRY IchWideFromAnsi(LONG cchAnsi, LPCSTR pchAnsi, UINT uCodePage)
{
LONG cchWide;
}
/* Converts the character index */
+/* Win: CalcCharacterPositionWtoA */
LONG APIENTRY IchAnsiFromWide(LONG cchWide, LPCWSTR pchWide, UINT uCodePage)
{
LONG cb, cchAnsi;