Platform SDK: International Features

ImmAssociateContext

The ImmAssociateContext function associates the specified input context with the specified window. By default, the system associates the default input context with each window as it is created.

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

HIMC ImmAssociateContext(
  HWND hWnd,   
  HIMC hIMC    
);

Parameters

hWnd
[in] Handle to the window to be associated with the input context.
hIMC
[in] Handle to the input context. If hIMC is NULL, the function removes any association the window may have with an input context and thus IME cannot be used in the window.

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.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Imm.h.
  Library: Use Imm32.lib.

See Also

Input Method Editor Overview, Input Method Editor Functions, ImmAssociateContextEx