0 out of 1 rated this helpful Rate this topic

WM_INPUTLANGCHANGEREQUEST message

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.

#define WM_INPUTLANGCHANGEREQUEST       0x0050

Parameters

wParam

The new input locale. This parameter can be a combination of the following flags.

ValueMeaning
INPUTLANGCHANGE_BACKWARD
0x0004

A hot key was used to choose the previous input locale in the installed list of input locales. This flag cannot be used with the INPUTLANGCHANGE_FORWARD flag.

INPUTLANGCHANGE_FORWARD
0x0002

A hot key was used to choose the next input locale in the installed list of input locales. This flag cannot be used with the INPUTLANGCHANGE_BACKWARD flag.

INPUTLANGCHANGE_SYSCHARSET
0x0001

The new input locale's keyboard layout can be used with the system character set.

 

lParam

The input locale identifier. For more information, see Languages, Locales, and Keyboard Layouts.

Return value

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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

See also

Reference
DefWindowProc
WM_INPUTLANGCHANGE
Conceptual
Windows

 

 

Send comments about this topic to Microsoft

Build date: 9/11/2011

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ
Use TSF instead of this message
See "What broke the input language messages?" by Michael on his blog "Sorting it all Out" ( http://blogs.msdn.com/b/michkap/archive/2006/05/16/598980.aspx ).

This explain why these messages are no longer reliable (since Windows XP!) and how to fix this.
Strange thingth
Generally MSDN sy that any WM_INPUTLANGCHANGEREQUEST is followed by WM_INPUTLANGCHANGE.
But I found a lot of places where REQUEST is not followed by WM_INPUTLANGCHANGE message.

More the way:
Any application I attached by SPY show following:
Post: WM_INPUTLANGCHANGEREQUEST;
Send: WM_INPUTLANGCHANGEREQUEST;
Return: WM_INPUTLANGCHANGEREQUEST;
So, its pretty interesting, why this message have such behaviour.
MSDN keeps silenca.
Doesn't seem to be posted in Windows 7?
I don't see this message being posted to Notepad, for instance, using the venerable SPYXX from MSVC6. I jus see WM_INPUTLANGCHANGE messages. (And for some reason, using spyxx from MSVS9, I don't see even those...)
Value
WM_INPUTLANGCHANGEREQUEST = &H50