Export (0) Print
Expand All

WM_IME_COMPOSITION message

Sent to an application when the IME changes composition status as a result of a keystroke. A window receives this message through its WindowProc function.



LRESULT CALLBACK WindowProc(
  HWND  hwnd,     
  WM_IME_COMPOSITION,   
  WPARAM wParam,
  LPARAM lParam          
);

Parameters

hwnd

A handle to window.

wParam

DBCS character representing the latest change to the composition string.

lParam

Value specifying how the composition string or character changed. This parameter can be one or more of the following values. For more information about these values, see IME Composition String Values.

GCS_COMPATTR
GCS_COMPCLAUSE
GCS_COMPREADSTR
GCS_COMPREADATTR
GCS_COMPREADCLAUSE
GCS_COMPSTR
GCS_CURSORPOS
GCS_DELTASTART
GCS_RESULTCLAUSE
GCS_RESULTREADCLAUSE
GCS_RESULTREADSTR
GCS_RESULTSTR

The lParam parameter can also have one or more of the following values.

ValueMeaning
CS_INSERTCHAR

Insert the wParam composition character at the current insertion point. An application should display the composition character if it processes this message.

CS_NOMOVECARET

Do 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 specified character at the current caret position but should not move the caret to the next position. A subsequent WM_IME_COMPOSITION message with GCS_RESULTSTR will replace this character.

 

Return value

This message has no return value.

Remarks

An application should process this message if it displays composition characters itself. Otherwise, it should send the message to the IME window.

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 specified. 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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h);
Imm.h (include Windows.h)

See also

Input Method Manager
Input Method Manager Messages
ImmGetCompositionString

 

 

Community Additions

ADD
Show:
© 2014 Microsoft