Author: tretiakov
Date: Thu Feb 22 22:43:27 2007
New Revision: 25880
URL:
http://svn.reactos.org/svn/reactos?rev=25880&view=rev
Log:
Handle WM_INPUTLANGCHANGE and WM_INPUTLANGCHANGEREQUEST in DefWindowProc.
Modified:
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/include/psdk/winuser.h
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c Thu Feb 22 22:43:27 2007
@@ -987,6 +987,8 @@
}
+
+
LRESULT STDCALL
User32DefWindowProc(HWND hWnd,
UINT Msg,
@@ -1522,7 +1524,34 @@
{
return (1);
}
-
+
+ case WM_INPUTLANGCHANGEREQUEST:
+ {
+ HKL NewHkl;
+
+ if(wParam & INPUTLANGCHANGE_BACKWARD
+ && wParam & INPUTLANGCHANGE_FORWARD)
+ {
+ return FALSE;
+ }
+
+ //FIXME: What to do with INPUTLANGCHANGE_SYSCHARSET ?
+
+ if(wParam & INPUTLANGCHANGE_BACKWARD) NewHkl = HKL_PREV;
+ else if(wParam & INPUTLANGCHANGE_FORWARD) NewHkl = HKL_NEXT;
+ else NewHkl = lParam;
+
+ NtUserActivateKeyboardLayout(NewHkl, 0);
+
+ return TRUE;
+ }
+
+ case WM_INPUTLANGCHANGE:
+ {
+ //FIXME: What to do?
+ return TRUE;
+ }
+
case WM_ENDSESSION:
if (wParam) PostQuitMessage(0);
return 0;
Modified: trunk/reactos/include/psdk/winuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winuser.h (original)
+++ trunk/reactos/include/psdk/winuser.h Thu Feb 22 22:43:27 2007
@@ -90,6 +90,9 @@
#define KLF_NOTELLSHELL 128
#define KLF_SETFORPROCESS 256
#define KL_NAMELENGTH 9
+#define INPUTLANGCHANGE_BACKWARD 4
+#define INPUTLANGCHANGE_FORWARD 2
+#define INPUTLANGCHANGE_SYSCHARSET 1
#define MF_ENABLED 0
#define MF_GRAYED 1
#define MF_DISABLED 2