WM_IME_COMPOSITION

This message is sent to an application when the IME changes composition status as a result of a key stroke. An application should process this message if it displays composition characters itself. Otherwise, it should send the message to the IME window.

At a Glance

Header file: Imm.h
Windows CE versions: 2.10 and later (Japanese version 1.0 and later)

Syntax

WM_IME_COMPOSITION chDBCS = (WORD) wParam;
fFlags = (BOOL) lParam;

Parameters

chDBCS

DBCS character that represents the latest change to the composition string.

fFlags

Change flag that indicates how the composition string or character changed. It can be one or more of the following values:

GCS_COMPSTR GCS_SETCURSORPOS
GCS_COMPATTR GCS_RESULTSTR
GCS_COMPCLAUSE GCS_RESULTCLAUSE
GCS_COMPREADSTR GCS_RESULTREADSTR
GCS_COMPREADATTR GCS_RESULTREADCLAUSE
GCS_COMPREADCLAUSE GCR_ERRORSTR
GCS_TYPINGINFO GCR_INFOSTR

Return Values

None

Remarks

Windows CE applications cannot create IME windows.

For more information about these values, see the “IME Composition String Values” table in Input Method Editor Constants.Windows CE applications cannot create IME windows.

The fFlags parameter can also be a combination of the following values:

CS_INSERTCHAR

Specifies that the given composition character should be inserted at the current insertion point. An application should display the composition character if it processes this message.

CS_NOMOVECARET

Specifies that the application must not move the caret position as a result of processing the message. For example, if an IME specifies a combination of CS_INSERTCHAR and CS_NOMOVECARET, the application should insert the given character at the current caret position but should not move caret to the next position. A subsequent WM_IME_COMPOSITION message with GCS_RESULTSTR will replace this character.

If the application has created an IME window, it should pass this message to that window. The DefWindowProc function processes this message by passing it to the default IME window. The IME window processes this message by updating its appearance based on the change flag given. An application can call ImmGetCompositionString to retrieve the new composition status.

If none of the GCS_* values are set, the message indicates that the current composition has been canceled and applications that draw the composition string should delete the string.

See Also

DefWindowProc, ImmGetCompositionString