ImmAssociateContext function

Associates the specified input context with the specified window. By default, the operating system associates the default input context with each window as it is created.

Note  To specify a type of association, the application should use the ImmAssociateContextEx function.
 

Syntax


HIMC ImmAssociateContext(
  _In_ HWND hWnd,
  _In_ HIMC hIMC
);

Parameters

hWnd [in]

Handle to the window to associate with the input context.

hIMC [in]

Handle to the input context. If hIMC is NULL, the function removes any association the window has with an input context. Thus IME cannot be used in the window.

Return value

Returns the handle to the input context previously associated with the window.

Remarks

When associating an input context with a window, an application must remove the association before destroying the input context. One way to do this is to save the handle and reassociate it to the default input context with the window.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Version

East Asian language support installed.

Header

Imm.h (include Windows.h)

Library

Imm32.lib

DLL

Imm32.dll

See also

Input Method Manager
Input Method Manager Functions
ImmAssociateContextEx

 

 

Show: