ReactOS 0.4.16-dev-306-g647d351
key_sequence_dialog.c File Reference
#include "input.h"
Include dependency graph for key_sequence_dialog.c:

Go to the source code of this file.

Functions

INT_PTR CALLBACK ChangeKeySeqDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Function Documentation

◆ ChangeKeySeqDialogProc()

INT_PTR CALLBACK ChangeKeySeqDialogProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 12 of file key_sequence_dialog.c.

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
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define LOWORD(l)
Definition: pedump.c:82
DWORD dwLanguage
Definition: input.h:64
DWORD dwLayout
Definition: input.h:65
#define GWLP_USERDATA
Definition: treelist.c:63
#define HIWORD(l)
Definition: typedefs.h:247
#define GetWindowLongPtrW
Definition: winuser.h:4832
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define IDCANCEL
Definition: winuser.h:834
#define BST_UNCHECKED
Definition: winuser.h:199
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_INITDIALOG
Definition: winuser.h:1742
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:833
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define BN_CLICKED
Definition: winuser.h:1928
#define SetWindowLongPtrW
Definition: winuser.h:5358
#define BST_CHECKED
Definition: winuser.h:197
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by KeySettingsDialogProc().