On 4/23/2010 16:14, André Hentschel wrote:
--- dlls/imm32/imm.c | 13 ++++++++++--- dlls/imm32/tests/imm32.c | 8 ++++---- 2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 2a85b70..2fd6477 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -516,12 +516,19 @@ static BOOL CALLBACK _ImmAssociateContextExEnumProc(HWND hwnd, LPARAM lParam) */ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags) { - TRACE("(%p, %p, %d): stub\n", hWnd, hIMC, dwFlags); + TRACE("(%p, %p, 0x%x):\n", hWnd, hIMC, dwFlags);
if (!IMM_GetThreadData()->defaultContext) IMM_GetThreadData()->defaultContext = ImmCreateContext();
- if (dwFlags == IACE_DEFAULT) + if (!hWnd) return FALSE; + + if (!dwFlags) + { + ImmAssociateContext(hWnd,hIMC); + return TRUE; + } + else if (dwFlags == IACE_DEFAULT) { ImmAssociateContext(hWnd,IMM_GetThreadData()->defaultContext); return TRUE; @@ -539,7 +546,7 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags) } else { - ERR("Unknown dwFlags 0x%x\n",dwFlags); + FIXME("Unknown dwFlags 0x%x\n",dwFlags); return FALSE; } }
Some comments for this. Why return value from ImmAssociateContext is never used? Also it nicely turns to switch() for this dwFlags parameter, but it's a matter of taste.