Platform SDK: International Features

WM_IME_SETCONTEXT

The WM_IME_SETCONTEXT message is sent to an application when a window of the application is activated. If the application has created an IME window, it should call the ImmIsUIMessage function. Otherwise, it should pass this message to the DefWindowProc function.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
  HWND hwnd,       // handle to window
  UINT uMsg,       // WM_IME_SETCONTEXT
  WPARAM wParam,   // (BOOL) active status
  LPARAM lParam    // display options
);

Parameters

wParam
Indicates if the window is active. If this parameter is TRUE, the input context is active. Otherwise, the context is inactive.
lParam
Specifies the display options. This parameter can be one or more of the following values.
Value Description
ISC_SHOWUICOMPOSITIONWINDOW Shows the composition window by UI window.
ISC_SHOWUIGUIDWINDOW Shows the guide window by UI window.
ISC_SHOWUISOFTKBD Shows the soft keyboard by UI window.
ISC_SHOWUICANDIDATEWINDOW Shows the candidate window of Index 0 by UI window.
ISC_SHOWUICANDIDATEWINDOW << 1 Shows the candidate window of Index 1 by UI window.
ISC_SHOWUICANDIDATEWINDOW << 2 Shows the candidate window of Index 2 by UI window.
ISC_SHOWUICANDIDATEWINDOW << 3 Shows the candidate window of Index 3 by UI window.

Return Values

Returns the value returned by DefWindowProc or ImmIsUIMessage.

Remarks

If the application draws the composition window, the default IME window does not need to show its composition window. In this case, the application must clear the ISC_SHOWUICOMPOSITIONWINDOW value from the lParam parameter before passing the message to the DefWindowProc or ImmIsUIMessage functions. Likewise, if an application wants to display a certain UI window, it should remove the corresponding value so IME will not display it.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Imm.h.

See Also

Input Method Editor Overview, Input Method Editor Messages, DefWindowProc, ImmIsUIMessage