ReactOS  0.4.13-dev-551-gf37fb1f
settings_page.c
Go to the documentation of this file.
1 /*
2  * PROJECT: input.dll
3  * FILE: dll/cpl/input/settings_page.c
4  * PURPOSE: input.dll
5  * PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
6  * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7  */
8 
9 #include "input.h"
10 #include "layout_list.h"
11 #include "locale_list.h"
12 #include "input_list.h"
13 
14 
15 static HICON
16 CreateLayoutIcon(LPWSTR szLayout, BOOL bIsDefault)
17 {
20  HDC hdc;
21  HDC hdcsrc;
23  HICON hIcon = NULL;
24 
25  hdcsrc = GetDC(NULL);
26  hdc = CreateCompatibleDC(hdcsrc);
28 
29  ReleaseDC(NULL, hdcsrc);
30 
31  if (hdc && hBitmap)
32  {
33  HBITMAP hBmpNew;
34 
35  hBmpNew = CreateBitmap(width, height, 1, 1, NULL);
36  if (hBmpNew)
37  {
38  LOGFONTW lf;
39 
40  if (SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0))
41  {
43  HFONT hFont;
44 
46 
47  if (hFont != NULL)
48  {
49  HBITMAP hBmpOld;
50 
51  hBmpOld = SelectObject(hdc, hBitmap);
52 
53  if (hBmpOld != NULL)
54  {
55  RECT rect;
56 
57  SetRect(&rect, 0, 0, width / 2, height);
58 
59  if (bIsDefault != FALSE)
60  {
63 
64  ExtTextOutW(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, L"", 0, NULL);
65 
67  DrawTextW(hdc, L"\x2022", 1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
68  }
69  else
70  {
72  }
73 
74  SetRect(&rect, width / 2, 0, width, height);
75 
78 
79  ExtTextOutW(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, L"", 0, NULL);
80 
82  DrawTextW(hdc, szLayout, 2, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
83 
84  SelectObject(hdc, hBmpNew);
85 
86  PatBlt(hdc, 0, 0, width, height, BLACKNESS);
87 
88  SelectObject(hdc, hBmpOld);
89 
91  IconInfo.hbmMask = hBmpNew;
93 
95 
96  DeleteObject(hBmpOld);
97  }
98 
100  }
101  }
102 
103  DeleteObject(hBmpNew);
104  }
105  }
106 
107  DeleteDC(hdc);
109 
110  return hIcon;
111 }
112 
113 
114 static VOID
115 SetControlsState(HWND hwndDlg, BOOL bIsEnabled)
116 {
117  EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE_BUTTON), bIsEnabled);
118  EnableWindow(GetDlgItem(hwndDlg, IDC_PROP_BUTTON), bIsEnabled);
119  EnableWindow(GetDlgItem(hwndDlg, IDC_SET_DEFAULT), bIsEnabled);
120 }
121 
122 
123 static VOID
125 {
126  INT ItemIndex = -1;
127  INT ImageIndex = -1;
128  LV_ITEM item;
129  HIMAGELIST hImageList;
130 
131  hImageList = ListView_GetImageList(hwndList, LVSIL_SMALL);
132 
133  if (hImageList != NULL)
134  {
135  HICON hLayoutIcon;
136 
137  hLayoutIcon = CreateLayoutIcon(pInputNode->pszIndicator,
138  (pInputNode->wFlags & INPUT_LIST_NODE_FLAG_DEFAULT));
139 
140  if (hLayoutIcon != NULL)
141  {
142  ImageIndex = ImageList_AddIcon(hImageList, hLayoutIcon);
143  DestroyIcon(hLayoutIcon);
144  }
145  }
146 
147  ZeroMemory(&item, sizeof(item));
148 
149  item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
150  item.pszText = pInputNode->pLocale->pszName;
151  item.iItem = ListView_GetItemCount(hwndList) + 1;
152  item.lParam = (LPARAM)pInputNode;
153  item.iImage = ImageIndex;
154 
155  ItemIndex = ListView_InsertItem(hwndList, &item);
156 
157  ListView_SetItemText(hwndList, ItemIndex, 1, pInputNode->pLayout->pszName);
158 }
159 
160 
161 static VOID
163 {
164  INPUT_LIST_NODE *pCurrentInputNode;
165  HIMAGELIST hImageList;
166 
167  hImageList = ListView_GetImageList(hwndList, LVSIL_SMALL);
168  if (hImageList != NULL)
169  {
170  ImageList_RemoveAll(hImageList);
171  }
172 
173  ListView_DeleteAllItems(hwndList);
174 
175  for (pCurrentInputNode = InputList_GetFirst();
176  pCurrentInputNode != NULL;
177  pCurrentInputNode = pCurrentInputNode->pNext)
178  {
179  if (!(pCurrentInputNode->wFlags & INPUT_LIST_NODE_FLAG_DELETED))
180  {
181  AddToInputListView(hwndList, pCurrentInputNode);
182  }
183  }
184 }
185 
186 
187 static VOID
189 {
190  HWND hwndInputList;
191 
195 
196  hwndInputList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
197 
198  if (hwndInputList != NULL)
199  {
200  WCHAR szBuffer[MAX_STR_LEN];
201  HIMAGELIST hLayoutImageList;
203 
205 
206  ZeroMemory(&column, sizeof(column));
207 
209 
210  LoadStringW(hApplet, IDS_LANGUAGE, szBuffer, ARRAYSIZE(szBuffer));
211  column.fmt = LVCFMT_LEFT;
212  column.iSubItem = 0;
213  column.pszText = szBuffer;
214  column.cx = 175;
215  ListView_InsertColumn(hwndInputList, 0, &column);
216 
217  LoadStringW(hApplet, IDS_LAYOUT, szBuffer, ARRAYSIZE(szBuffer));
218  column.fmt = LVCFMT_RIGHT;
219  column.cx = 155;
220  column.iSubItem = 1;
221  column.pszText = szBuffer;
222  ListView_InsertColumn(hwndInputList, 1, &column);
223 
224  hLayoutImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON) * 2,
226  ILC_COLOR8 | ILC_MASK, 0, 0);
227  if (hLayoutImageList != NULL)
228  {
229  HIMAGELIST hOldImagelist = ListView_SetImageList(hwndInputList, hLayoutImageList, LVSIL_SMALL);
230  ImageList_Destroy(hOldImagelist);
231  }
232 
233  UpdateInputListView(hwndInputList);
234  }
235 
236  SetControlsState(hwndDlg, FALSE);
237 }
238 
239 
240 static VOID
242 {
246 }
247 
248 
249 VOID
251 {
252  switch (LOWORD(wParam))
253  {
254  case IDC_ADD_BUTTON:
255  {
256  if (DialogBoxW(hApplet,
258  hwndDlg,
259  AddDialogProc) == IDOK)
260  {
262  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
263  }
264  }
265  break;
266 
267  case IDC_REMOVE_BUTTON:
268  {
269  HWND hwndList;
270 
271  hwndList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
272 
273  if (hwndList != NULL)
274  {
275  LVITEM item = { 0 };
276 
277  item.mask = LVIF_PARAM;
278  item.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
279 
280  if (ListView_GetItem(hwndList, &item) != FALSE)
281  {
283  UpdateInputListView(hwndList);
284  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
285  }
286  }
287  }
288  break;
289 
290  case IDC_PROP_BUTTON:
291  {
292  HWND hwndList;
293 
294  hwndList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
295 
296  if (hwndList != NULL)
297  {
298  LVITEM item = { 0 };
299 
300  item.mask = LVIF_PARAM;
301  item.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
302 
303  if (ListView_GetItem(hwndList, &item) != FALSE)
304  {
307  hwndDlg,
309  item.lParam) == IDOK)
310  {
311  UpdateInputListView(hwndList);
312  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
313  }
314  }
315  }
316  }
317  break;
318 
319  case IDC_SET_DEFAULT:
320  {
321  HWND hwndList;
322 
323  hwndList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
324 
325  if (hwndList != NULL)
326  {
327  LVITEM item = { 0 };
328 
329  item.mask = LVIF_PARAM;
330  item.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
331 
332  if (ListView_GetItem(hwndList, &item) != FALSE)
333  {
335  UpdateInputListView(hwndList);
336  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
337  }
338  }
339  }
340  break;
341 
342  case IDC_KEY_SET_BTN:
343  {
346  hwndDlg,
348  }
349  break;
350  }
351 }
352 
354 {
355  HANDLE hToken;
356  LUID luid;
357  TOKEN_PRIVILEGES tokenPrivileges;
358  BOOL Ret;
359 
362  &hToken);
363  if (!Ret)
364  return Ret; // failure
365 
366  Ret = LookupPrivilegeValueW(NULL, lpPrivilegeName, &luid);
367  if (Ret)
368  {
369  tokenPrivileges.PrivilegeCount = 1;
370  tokenPrivileges.Privileges[0].Luid = luid;
371  tokenPrivileges.Privileges[0].Attributes = bEnable ? SE_PRIVILEGE_ENABLED : 0;
372 
373  Ret = AdjustTokenPrivileges(hToken, FALSE, &tokenPrivileges, 0, 0, 0);
374  }
375 
376  CloseHandle(hToken);
377  return Ret;
378 }
379 
380 static VOID
382 {
383  LPNMHDR header;
384 
385  header = (LPNMHDR)lParam;
386 
387  switch (header->code)
388  {
389  case NM_CLICK:
390  {
391  if (header->idFrom == IDC_KEYLAYOUT_LIST)
392  {
393  INT iSelected = ListView_GetNextItem(header->hwndFrom, -1, LVNI_SELECTED);
394 
395  if (iSelected != -1)
396  {
397  LVITEM item = { 0 };
398 
399  SetControlsState(hwndDlg, TRUE);
400 
401  item.mask = LVIF_PARAM;
402  item.iItem = iSelected;
403 
404  if (ListView_GetItem(header->hwndFrom, &item) != FALSE)
405  {
406  INPUT_LIST_NODE *pInput;
407 
408  pInput = (INPUT_LIST_NODE*) item.lParam;
409 
410  if (pInput != NULL && pInput->wFlags & INPUT_LIST_NODE_FLAG_DEFAULT)
411  {
413  }
414  }
415  }
416  else
417  {
418  SetControlsState(hwndDlg, FALSE);
419  }
420  }
421  }
422  break;
423 
424  case PSN_APPLY:
425  {
426  /* Write Input Methods list to registry */
427  if (InputList_Process())
428  {
429  /* Needs reboot */
430  WCHAR szNeedsReboot[128], szLanguage[64];
431  LoadStringW(hApplet, IDS_REBOOT_NOW, szNeedsReboot, _countof(szNeedsReboot));
432  LoadStringW(hApplet, IDS_LANGUAGE, szLanguage, _countof(szLanguage));
433 
434  if (MessageBoxW(hwndDlg, szNeedsReboot, szLanguage,
436  {
439  }
440  }
441  }
442  break;
443  }
444 }
445 
446 
449 {
450  switch (uMsg)
451  {
452  case WM_INITDIALOG:
453  OnInitSettingsPage(hwndDlg);
454  break;
455 
456  case WM_DESTROY:
457  OnDestroySettingsPage(hwndDlg);
458  break;
459 
460  case WM_COMMAND:
461  OnCommandSettingsPage(hwndDlg, wParam);
462  break;
463 
464  case WM_NOTIFY:
465  OnNotifySettingsPage(hwndDlg, lParam);
466  break;
467  }
468 
469  return FALSE;
470 }
VOID OnCommandSettingsPage(HWND hwndDlg, WPARAM wParam)
INT_PTR CALLBACK AddDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: add_dialog.c:177
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define LV_ITEM
Definition: commctrl.h:2309
#define EWX_FORCE
Definition: winuser.h:630
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2406
GLint GLint GLsizei width
Definition: gl.h:1546
static HICON
Definition: imagelist.c:84
INT_PTR CALLBACK EditDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: edit_dialog.c:14
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
#define CloseHandle
Definition: compat.h:398
#define COLOR_HIGHLIGHT
Definition: winuser.h:916
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
Definition: misc.c:782
#define LVCF_WIDTH
Definition: commctrl.h:2559
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define LVSIL_SMALL
Definition: commctrl.h:2271
#define IDYES
Definition: winuser.h:829
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define LVCF_TEXT
Definition: commctrl.h:2560
HDC WINAPI GetDC(_In_opt_ HWND)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define _countof(array)
Definition: fontsub.cpp:30
VOID InputList_Destroy(VOID)
Definition: input_list.c:193
#define IDC_ADD_BUTTON
Definition: resource.h:22
#define LV_COLUMN
Definition: commctrl.h:2519
INT_PTR CALLBACK KeySettingsDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID LayoutList_Create(VOID)
Definition: layout_list.c:85
#define LVCFMT_RIGHT
Definition: commctrl.h:2571
LOCALE_LIST_NODE * pLocale
Definition: input_list.h:18
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2706
#define IDD_ADD
Definition: resource.h:16
#define IDC_SET_DEFAULT
Definition: resource.h:21
$ULONG PrivilegeCount
Definition: setypes.h:969
#define LVCFMT_LEFT
Definition: commctrl.h:2570
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
static VOID UpdateInputListView(HWND hwndList)
#define SM_CYSMICON
Definition: winuser.h:1003
HINSTANCE hApplet
Definition: access.c:17
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define LVNI_SELECTED
Definition: commctrl.h:2396
UINT_PTR WPARAM
Definition: windef.h:207
#define IDD_KEYSETTINGS
Definition: resource.h:17
#define PSN_APPLY
Definition: prsht.h:117
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2380
int32_t INT_PTR
Definition: typedefs.h:62
#define EWX_REBOOT
Definition: winuser.h:633
INPUT_LIST_NODE * InputList_GetFirst(VOID)
Definition: input_list.c:585
LAYOUT_LIST_NODE * pLayout
Definition: input_list.h:19
#define IDD_INPUT_LANG_PROP
Definition: resource.h:14
VOID LocaleList_Destroy(VOID)
Definition: locale_list.c:60
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define COLOR_WINDOW
Definition: winuser.h:908
int32_t INT
Definition: typedefs.h:56
DWORD WINAPI GetSysColor(_In_ int)
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
HFONT hFont
Definition: main.c:53
struct tagNMHDR * LPNMHDR
#define ImageList_RemoveAll(himl)
Definition: commctrl.h:541
#define IDC_KEY_SET_BTN
Definition: resource.h:25
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:925
#define LVIF_TEXT
Definition: commctrl.h:2281
#define LVCF_SUBITEM
Definition: commctrl.h:2561
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define IDC_PROP_BUTTON
Definition: resource.h:24
#define SE_PRIVILEGE_ENABLED
Definition: setypes.h:63
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2608
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:801
#define ListView_GetImageList(hwnd, iImageList)
Definition: commctrl.h:2268
#define ETO_OPAQUE
Definition: wingdi.h:646
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID InputList_Create(VOID)
Definition: input_list.c:518
HBITMAP hbmMask
Definition: winuser.h:3079
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2276
smooth NULL
Definition: ftsmooth.c:416
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define MB_YESNOCANCEL
Definition: winuser.h:812
LONG_PTR LPARAM
Definition: windef.h:208
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2279
HBITMAP hbmColor
Definition: winuser.h:3080
INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define DT_VCENTER
Definition: winuser.h:543
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:917
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4268
#define WM_DESTROY
Definition: winuser.h:1591
static VOID OnNotifySettingsPage(HWND hwndDlg, LPARAM lParam)
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
Definition: commctrl.h:2663
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define IDC_REMOVE_BUTTON
Definition: resource.h:23
BOOL fIcon
Definition: winuser.h:3076
#define TOKEN_QUERY
Definition: setypes.h:874
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
#define IDS_LANGUAGE
Definition: resource.h:50
if(!(yy_init))
Definition: macro.lex.yy.c:714
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define INPUT_LIST_NODE_FLAG_DEFAULT
Definition: input_list.h:11
#define PropSheet_Changed(d, w)
Definition: prsht.h:326
#define COLOR_WINDOWTEXT
Definition: winuser.h:911
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1168
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
Definition: cursoricon.c:2546
#define LVIF_IMAGE
Definition: commctrl.h:2282
int WINAPI GetSystemMetrics(_In_ int)
VOID LayoutList_Destroy(VOID)
Definition: layout_list.c:61
VOID InputList_SetDefault(INPUT_LIST_NODE *pNode)
Definition: input_list.c:452
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2697
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:537
#define SM_CXSMICON
Definition: winuser.h:1002
#define MB_ICONINFORMATION
Definition: winuser.h:796
static const WCHAR L[]
Definition: oid.c:1250
HDC hdc
Definition: main.c:9
#define INPUT_LIST_NODE_FLAG_DELETED
Definition: input_list.h:10
#define ILC_MASK
Definition: commctrl.h:336
static VOID OnDestroySettingsPage(HWND hwndDlg)
#define WM_COMMAND
Definition: winuser.h:1716
#define NM_CLICK
Definition: commctrl.h:130
static VOID AddToInputListView(HWND hwndList, INPUT_LIST_NODE *pInputNode)
BOOL WINAPI ExitWindowsEx(_In_ UINT, _In_ DWORD)
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
Definition: security.c:376
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
static VOID SetControlsState(HWND hwndDlg, BOOL bIsEnabled)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:886
#define DT_SINGLELINE
Definition: winuser.h:540
HWND WINAPI GetParent(_In_ HWND)
#define LVCF_FMT
Definition: commctrl.h:2558
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
VOID InputList_Remove(INPUT_LIST_NODE *pNode)
Definition: input_list.c:478
_In_ BOOL bEnable
Definition: winddi.h:3426
static ATOM item
Definition: dde.c:856
#define BLACKNESS
Definition: wingdi.h:322
BOOL WINAPI DeleteDC(_In_ HDC)
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
#define SPI_GETICONTITLELOGFONT
Definition: winuser.h:1362
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
Definition: setypes.h:970
#define MAX_STR_LEN
Definition: defines.h:33
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define IDS_REBOOT_NOW
Definition: resource.h:60
#define ListView_GetItem(hwnd, pitem)
Definition: commctrl.h:2366
#define LVIF_PARAM
Definition: commctrl.h:2283
struct _INPUT_LIST_NODE * pNext
Definition: input_list.h:26
#define LVITEM
Definition: commctrl.h:2347
static HICON CreateLayoutIcon(LPWSTR szLayout, BOOL bIsDefault)
Definition: settings_page.c:16
#define SE_SHUTDOWN_NAME
Definition: winnt_old.h:383
BOOL InputList_Process(VOID)
Definition: input_list.c:338
#define ILC_COLOR8
Definition: commctrl.h:340
#define DT_CENTER
Definition: winuser.h:527
static VOID OnInitSettingsPage(HWND hwndDlg)
static HBITMAP
Definition: button.c:44
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL EnableProcessPrivileges(LPCWSTR lpPrivilegeName, BOOL bEnable)
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:5664
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDS_LAYOUT
Definition: resource.h:51
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define TOKEN_ADJUST_PRIVILEGES
Definition: setypes.h:876
_Out_opt_ PICONINFO IconInfo
Definition: ntuser.h:2267
#define WM_INITDIALOG
Definition: winuser.h:1715
static HBITMAP hBitmap
Definition: timezone.c:35
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
LOCALE_LIST_NODE * LocaleList_Create(VOID)
Definition: locale_list.c:84
struct CFHEADER header
Definition: fdi.c:109
WCHAR * pszIndicator
Definition: input_list.h:23
#define WM_NOTIFY
Definition: richedit.h:61
#define ListView_DeleteAllItems(hwnd)
Definition: commctrl.h:2386
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
#define IDC_KEYLAYOUT_LIST
Definition: resource.h:20