Functions That Manipulate Input Contexts

IMM Function

Description

ImmAssociateContext

Associates a specified input context with a specified window. Unless the application calls this function, the system will associate the default input context with the window handle. Before the application destroys the customized input context, it must reassign a different input context, typically the system default, to the window.

ImmCreateContext

Allocates memory for and initializes a new input context.

ImmDestroyContext

Releases the specified input context and frees memory associated with it. For every call it makes to ImmCreateContext, an application must call ImmDestroyContext.

ImmEscape

Calls a specified subfunction, usually one that is country-specific. This function allows applications to access features of a particular IME that are not accessible through other IMM API functions. Any applications targeted to run on more than one Far East edition of Windows should not call the country-specific functions.

ImmGetCandidateList

Retrieves a specified candidate list and copies it to a specified buffer.

ImmGetCandidateListCount

Returns the number of bytes needed to accommodate all the characters in the candidate list.

ImmGetCandidateWindow

Retrieves the CANDIDATEFORM structure, which in-cludes information such as the position, rectangular dimensions, and style of the candidate window.

ImmGetCompositionFont

Retrieves the logical font currently used to display characters in the composition window.

ImmGetCompositionString

Retrieves information about the string in the composition window. Applications should call this function in response to the message WM_IME_COMPOSITION.

ImmGetCompositionWindow

Retrieves the COMPOSITIONFORM structure, which includes information such as the position, rectangular dimensions, and direction (horizontal or vertical) of the composition window.

ImmGetContext

Retrieves the input context associated with a specified window. Applications must call this function before accessing the contents of an input context.

ImmGetConversionList

Retrieves a list of characters or words associated with a single character or word.

ImmGetConversionStatus

Retrieves the current conversion status.

ImmGetDefaultIMEWnd

Retrieves the default window handle for the IME class. The system will create a default IME window, based on the IME class, for every thread. Applications can send WM_IME_CONTROL messages to this window.

ImmGetGuideLine

Retrieves error information and other messages. Applications should call this function in response to a WM_IME_NOTIFY message with a wParam value of IMN_GUIDELINE.

ImmGetOpenStatus

Tells you whether the specified IME is open or closed.

ImmGetStatusWindowPos

Retrieves the position of the status window, defined in screen coordinates.

ImmNotifyIME

Notifies the IME that the status of the input context has changed. For example, the application might have opened or closed the candidate window or selected a character in the candidate list.

ImmReleaseContext

Releases the specified input context and unlocks memory associated with it. For every call it makes to ImmGetContext, an application must call ImmReleaseContext.

ImmSetCandidateWindow

Sets candidate window properties, such as position. Both applications and IMEs can call this function, which generates a WM_IME_NOTIFY message with a wParam value of IMN_SETCANDIDATEPOS.

ImmSetCompositionFont

Sets the logical font used to display characters in the composition window. The IME might change behavior, depending on the font used. For example, if the application specifies a vertical font, the IME might change the way it handles arrow keys. Calling this function generates a WM_IME_NOTIFY message with a wParam value of IMN_SETCOMPOSITIONFONT.

ImmSetCompositionString

Sets the appearance of the string in the composition window.

ImmSetCompositionWindow

Sets composition window properties, such as position. Both applications and IMEs can call this function, which generates a WM_IME_NOTIFY message with a wParam value of IMN_SETCOMPOSITIONWINDOW.

ImmSetConversionStatus

Sets the current conversion status. Both applications and IMEs can call this function, which generates a WM_IME_NOTIFY message with a wParam value of IMN_SETCONVERSIONSTATUS.

ImmSetOpenStatus

Opens or closes the IME. Both applications and IMEs can call this function, which generates a WM_IME_NOTIFY message with a wParam value of IMN_SETOPENSTATUS.

ImmSetStatusWindowPos

Sets the position of the status window, defined in screen coordinates. Both applications and IMEs can call this function, which generates a WM_IME_NOTIFY message with a wParam value of IMN_SETSTATUSWINDOWPOS.