windows_programming_notes.nbk: Home | Index | Next Page: WM_KEYDOWN | Previous Page: WM_INPUTLANGCHANGE


 WM_INPUTLANGCHANGEREQUEST

The WM_INPUTLANGCHANGEREQUEST message is posted to the window with the focus when the user chooses a new input language, either with the hotkey (specified in the Keyboard control panel application) or from the indicator on the system taskbar. An application can accept the change by passing the message to the DefWindowProc function or reject the change (and prevent it from taking place) by returning immediately.

A window receives this message through its WindowProc function.

    LRESULT CALLBACK WindowProc(
      HWND hwnd,       // handle to window
      UINT uMsg,       // WM_INPUTLANGCHANGEREQUEST
      WPARAM wParam,   // input locale information
      LPARAM lParam    // input locale identifier (HKL)
    );

Parameters

Return Values

This message is posted, not sent, to the application, so the return value is ignored. To accept the change, the application should pass the message to DefWindowProc. To reject the change, the application should return zero without calling DefWindowProc.

Remarks

When the DefWindowProc function receives the WM_INPUTLANGCHANGEREQUEST message, it activates the new input locale and notifies the application of the change by sending the WM_INPUTLANGCHANGE message.

The language indicator is present on the taskbar only if you have installed more than one keyboard layout and if you have enabled the indicator using the Keyboard control panel application.

Requirements

  Windows NT/2000 or later: Requires Windows NT 4.0 or later.
  Windows 95/98/Me: Requires Windows 95 or later.
  Header: Declared in Winuser.h; include Windows.h.

windows_programming_notes.nbk: Home | Index | Next Page: WM_KEYDOWN | Previous Page: WM_INPUTLANGCHANGE


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time