WM_IME_SETCONTEXT

Sent to an application when a window of the application is being activated. If the application does not have its application IME window, the application must pass this message to DefWindowProc and should return the return value of the DefWindowProc. If the application has its application IME window, the application should call ImmIsUIMessage.

wParam

TRUE when the input context becomes active for the application. FALSE when the the input context becomes inactive for the application.

lParam

Can be a combination of these values:

ISC_SHOWUICOMPOSITIONWINDOW

Show the composition window.

ISC_SHOWUIGUIDWINDOW

Show the guide window.

ISC_SHOWUISOFTKBD

Show the soft keyboard.

ISC_SHOWUICANDIDATEWINDOW

Show the candidate window of Index 0.

(ISC_SHOWUICANDIDATEWINDOW << 1)

Show the candidate window of Index 1.

(ISC_SHOWUICANDIDATEWINDOW << 2)

Show the candidate window of Index 2.

(ISC_SHOWUICANDIDATEWINDOW << 3)

Show the candidate window of Index 3.


The UI window receives this message after an application calls DefWindowProc or ImmIsUIMessage with WM_IME_SETCONTEXT. The UI window should show the composition, guide, or candidate window as indicated by lParam.

If the application draws the composition window by itself, the UI window does not need to show its composition window. The application must clear the ISC_SHOWUICOMPOSITIONWINDOW bit of lParam and pass the bit to DefWindowProc or ImmIsUIMessage.