Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function associates the specified input context with the specified window.

Syntax

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.

Return Value

The handle to the input context previously associated with the window indicates success.

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 re-associate the handle to the default input context with the window.

If the hIMCparameter is NULL, the ImmAssociateContextfunction 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.

Requirements

Header imm.h
Library Coreimm.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later