ImmAssociateContext

The ImmAssociateContext function associates the specified input context with the specified window. If hIMC is NULL, the function removes any association the window may have with an input context. By default, the system associates the default input context with each window as it is created.

HIMC ImmAssociateContext(
  HWND hWnd,   
  HIMC hIMC    
);
 

Parameters

hWnd
Handle to the window to be associated with the input context.
hIMC
Handle to the input context.

Return Values

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

Remarks

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

Windows CE: If the hIMC parameter is NULL, the ImmAssociateContext function removes any association the window may have with an input context. By default, the system associates the default input context with each window as it is created.

An application can specify only the default input context or NULL.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 2.0 or later (FE).
  Header: Declared in imm.h.
  Import Library: Use imm32.lib.

See Also

Input Method Editor Overview, Input Method Editor Functions