Sent two bytes of composition characters to the application. This message is sent when an IME changes composition status as a result of a user's keystroke. The IME user interface window changes its appearance when it processes this message. An application can call ImmGetCompositionString to obtain detailed composition status.
wParam
Double byte character that is the latest change of composition character.
lParam
Flag that indicates how the composition string or character changed. An application check this to retrieve necessary information. It can be a combination of the following values:
GCS_COMPSTR
GCS_COMPATTR
GCS_COMPCLAUSE
GCS_COMPREADSTR
GCS_COMPREADATTR
GCS_COMPREADCLAUSE
GCS_TYPINGINFO
GCS_SETCURSORPOS
GCS_RESULTSTR
GCS_RESULTCLAUSE
GCS_RESULTREADSTR
GCS_RESULTREADCLAUSE
GCR_ERRORSTR
GCR_INFOSTR
The following values are special styles for WM_IME_COMPOSITION.
Value | Meaning |
CS_INSERTCHAR | An IME specifies this value when wParam shows a composition character which should be inserted into the current insertion point. An application should display a composition character if it processes this bit flag. |
CS_NOMOVECARET | An IME specifies this value to prevent an application from moving the caret position as a result of processing WM_IME_COMPOSITION. For example, if an IME specifies a combination of CS_INSERTCHAR and CS_NOMOVECARET, it means that an application should insert a character given by wParam into the current caret position, but should not move caret. Subsequent WM_IME_COMPOSITION with GCS_RESULTSTR replace this character. |
An application that needs to display composition characters by itself should not pass this message to either the application IME user interface window or DefWindowProc, which passes the message to the default IME window. An IME should give this message to an application even when the IME simply cancels the current composition. An application or IME UI should use this message to erase the current composition string.