WM_MSIME_xxx Messages

Describes the SendMessage function, which is used to communicate between the Input Method Editor (IME) and the IME context of an application.

These features are available for applications in the format of Per IME Interfaces. For more information, see Per IME Interfaces Characteristics.

Notes on Sub-Classing

For IME to receive messages sent to an IME user interface (UI) window, Microsoft IME needs to subclass it by using the following procedure.

When IME creates an instance of a UI-related window (toolbar, candidate, or composition), look for the parent window whose class name is IME and replace the WndProc method with the IME message filter (which has the ability to filter out such messages) using SetWindowLong (hwnd, GWL_WNDPROC, lpfnYourDefIMEWndProc).

Be sure to call the original WndProc method from lpfnYourDefIMEWndProc method so that regular messages process correctly.

SendMessage API

The SendMessage function is used to communicate between IME and the IME context of an application. You can associate a message with a function ID (or request ID) to further distinguish between different functions of the message and with a data structure for the function.

LRESULT SendMessage

Parameter Description

HWND hwnd

UI window of current IME obtained by ImmGetDefaultIMEWnd() method.

UINT msg

Each interface has a message ID WM_MSIME_* obtained by the RegisterWindowMessage() function.

WPARAM wParam

The function ID of an interface.

LPARAM lParam

Contains a pointer to structure defined for this function ID.

Message List

Message Description

WM_MSIME_SERVICE Method

Used by application to get a variety of information from Microsoft IME.

WM_MSIME_UIREADY Method

Sent by IME when an IME is ready to receive per-IME messages.

WM_MSIME_RECONVERTREQUEST Function

Used for reconversion request.

WM_MSIME_RECONVERT Method

Used for reconversion.

WM_MSIME_DOCUMENTFEED

Used for document feeding.

WM_MSIME_QUERYPOSITION

Query position.

WM_MSIME_MODEBIAS Method

Use extra conversion mode not defined in the Input Method Manager (IMM).

WM_MSIME_SHOWIMEPAD

Used to control the IME Pad.

WM_MSIME_MOUSE

Mouse operation related to IME.

WM_MSIME_KEYMAP

Share key mapping between application and IME.