ReactOS 0.4.15-dev-5669-g09dde2c
key_sequence_dialog.c
Go to the documentation of this file.
1/*
2* PROJECT: input.dll
3* FILE: dll/cpl/input/key_sequence_dialog.c
4* PURPOSE: input.dll
5* PROGRAMMER: Dmitry Chapyshev (dmitry@reactos.org)
6*/
7
8#include "input.h"
9
10
13{
15
16 switch (uMsg)
17 {
18 case WM_INITDIALOG:
19 {
20 KEY_SETTINGS *keySettings = (KEY_SETTINGS*) lParam;
21
22 if (keySettings != NULL)
23 {
24 SetWindowLongPtrW(hwndDlg, GWLP_USERDATA, (LONG_PTR) keySettings);
25
26 if (keySettings->dwLanguage == 3)
27 {
31 }
32 else
33 {
35
36 if (keySettings->dwLanguage == 1)
37 {
39 }
40 else
41 {
43 }
44 }
45
46 if (keySettings->dwLayout == 3)
47 {
51 }
52 else
53 {
55
56 if (keySettings->dwLayout == 1)
57 {
59 }
60 else
61 {
63 }
64 }
65 }
66 return TRUE;
67 }
68
69 case WM_COMMAND:
70 {
71 switch (LOWORD(wParam))
72 {
74 {
75 if (HIWORD(wParam) == BN_CLICKED)
76 {
78 {
81 }
82 else
83 {
86 }
87 }
88 }
89 break;
90
92 {
93 if (HIWORD(wParam) == BN_CLICKED)
94 {
96 {
99 }
100 else
101 {
104 }
105 }
106 }
107 break;
108
109 case IDC_CTRL_LANG:
110 {
111 if (HIWORD(wParam) == BN_CLICKED)
112 {
115 }
116 }
117 break;
118
120 {
121 if (HIWORD(wParam) == BN_CLICKED)
122 {
125 }
126 }
127 break;
128
129 case IDC_CTRL_LAYOUT:
130 {
131 if (HIWORD(wParam) == BN_CLICKED)
132 {
135 }
136 }
137 break;
138
140 {
141 if (HIWORD(wParam) == BN_CLICKED)
142 {
145 }
146 }
147 break;
148
149 case IDOK:
150 {
151 KEY_SETTINGS *keySettings;
152
153 keySettings = (KEY_SETTINGS*)GetWindowLongPtrW(hwndDlg, GWLP_USERDATA);
154
155 if (keySettings != NULL)
156 {
158 {
160 {
161 keySettings->dwLanguage = 2;
162 }
163 else
164 {
165 keySettings->dwLanguage = 1;
166 }
167 }
168 else
169 {
170 keySettings->dwLanguage = 3;
171 }
172
174 {
176 {
177 keySettings->dwLayout = 2;
178 }
179 else
180 {
181 keySettings->dwLayout = 1;
182 }
183 }
184 else
185 {
186 keySettings->dwLayout = 3;
187 }
188 }
189
190 EndDialog(hwndDlg, LOWORD(wParam));
191 }
192 break;
193
194 case IDCANCEL:
195 {
196 EndDialog(hwndDlg, LOWORD(wParam));
197 }
198 break;
199 }
200 }
201 break;
202 }
203
204 return FALSE;
205}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDC_CTRL_LANG
Definition: resource.h:38
#define IDC_LEFT_ALT_LAYOUT
Definition: resource.h:41
#define IDC_SWITCH_INPUT_LANG_CB
Definition: resource.h:36
#define IDC_LEFT_ALT_LANG
Definition: resource.h:40
#define IDC_SWITCH_KBLAYOUTS_CB
Definition: resource.h:37
#define IDC_CTRL_LAYOUT
Definition: resource.h:39
#define CALLBACK
Definition: compat.h:35
INT_PTR CALLBACK ChangeKeySeqDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define LOWORD(l)
Definition: pedump.c:82
DWORD dwLanguage
Definition: input.h:61
DWORD dwLayout
Definition: input.h:62
#define GWLP_USERDATA
Definition: treelist.c:63
int32_t INT_PTR
Definition: typedefs.h:64
#define HIWORD(l)
Definition: typedefs.h:247
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define GetWindowLongPtrW
Definition: winuser.h:4819
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDCANCEL
Definition: winuser.h:825
#define BST_UNCHECKED
Definition: winuser.h:199
#define WM_COMMAND
Definition: winuser.h:1730
#define WM_INITDIALOG
Definition: winuser.h:1729
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:824
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define BN_CLICKED
Definition: winuser.h:1915
#define SetWindowLongPtrW
Definition: winuser.h:5336
#define BST_CHECKED
Definition: winuser.h:197
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)