ReactOS  0.4.13-dev-66-gc714b7f
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  ListView_SetImageList(hwndInputList, hLayoutImageList, LVSIL_SMALL);
230  }
231 
232  UpdateInputListView(hwndInputList);
233  }
234 
235  SetControlsState(hwndDlg, FALSE);
236 }
237 
238 
239 static VOID
241 {
242  HIMAGELIST hImageList;
243 
247 
248  hImageList = ListView_GetImageList(GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST),
249  LVSIL_SMALL);
250  if (hImageList != NULL)
251  {
252  ImageList_Destroy(hImageList);
253  }
254 }
255 
256 
257 VOID
259 {
260  switch (LOWORD(wParam))
261  {
262  case IDC_ADD_BUTTON:
263  {
264  if (DialogBoxW(hApplet,
266  hwndDlg,
267  AddDialogProc) == IDOK)
268  {
270  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
271  }
272  }
273  break;
274 
275  case IDC_REMOVE_BUTTON:
276  {
277  HWND hwndList;
278 
279  hwndList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
280 
281  if (hwndList != NULL)
282  {
283  LVITEM item = { 0 };
284 
285  item.mask = LVIF_PARAM;
286  item.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
287 
288  if (ListView_GetItem(hwndList, &item) != FALSE)
289  {
291  UpdateInputListView(hwndList);
292  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
293  }
294  }
295  }
296  break;
297 
298  case IDC_PROP_BUTTON:
299  {
300  HWND hwndList;
301 
302  hwndList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
303 
304  if (hwndList != NULL)
305  {
306  LVITEM item = { 0 };
307 
308  item.mask = LVIF_PARAM;
309  item.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
310 
311  if (ListView_GetItem(hwndList, &item) != FALSE)
312  {
315  hwndDlg,
317  item.lParam) == IDOK)
318  {
319  UpdateInputListView(hwndList);
320  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
321  }
322  }
323  }
324  }
325  break;
326 
327  case IDC_SET_DEFAULT:
328  {
329  HWND hwndList;
330 
331  hwndList = GetDlgItem(hwndDlg, IDC_KEYLAYOUT_LIST);
332 
333  if (hwndList != NULL)
334  {
335  LVITEM item = { 0 };
336 
337  item.mask = LVIF_PARAM;
338  item.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
339 
340  if (ListView_GetItem(hwndList, &item) != FALSE)
341  {
343  UpdateInputListView(hwndList);
344  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
345  }
346  }
347  }
348  break;
349 
350  case IDC_KEY_SET_BTN:
351  {
354  hwndDlg,
356  }
357  break;
358  }
359 }
360 
362 {
363  HANDLE hToken;
364  LUID luid;
365  TOKEN_PRIVILEGES tokenPrivileges;
366  BOOL Ret;
367 
370  &hToken);
371  if (!Ret)
372  return Ret; // failure
373 
374  Ret = LookupPrivilegeValueW(NULL, lpPrivilegeName, &luid);
375  if (Ret)
376  {
377  tokenPrivileges.PrivilegeCount = 1;
378  tokenPrivileges.Privileges[0].Luid = luid;
379  tokenPrivileges.Privileges[0].Attributes = bEnable ? SE_PRIVILEGE_ENABLED : 0;
380 
381  Ret = AdjustTokenPrivileges(hToken, FALSE, &tokenPrivileges, 0, 0, 0);
382  }
383 
384  CloseHandle(hToken);
385  return Ret;
386 }
387 
388 static VOID
390 {
391  LPNMHDR header;
392 
393  header = (LPNMHDR)lParam;
394 
395  switch (header->code)
396  {
397  case NM_CLICK:
398  {
399  if (header->idFrom == IDC_KEYLAYOUT_LIST)
400  {
401  INT iSelected = ListView_GetNextItem(header->hwndFrom, -1, LVNI_SELECTED);
402 
403  if (iSelected != -1)
404  {
405  LVITEM item = { 0 };
406 
407  SetControlsState(hwndDlg, TRUE);
408 
409  item.mask = LVIF_PARAM;
410  item.iItem = iSelected;
411 
412  if (ListView_GetItem(header->hwndFrom, &item) != FALSE)
413  {
414  INPUT_LIST_NODE *pInput;
415 
416  pInput = (INPUT_LIST_NODE*) item.lParam;
417 
418  if (pInput != NULL && pInput->wFlags & INPUT_LIST_NODE_FLAG_DEFAULT)
419  {
421  }
422  }
423  }
424  else
425  {
426  SetControlsState(hwndDlg, FALSE);
427  }
428  }
429  }
430  break;
431 
432  case PSN_APPLY:
433  {
434  /* Write Input Methods list to registry */
435  if (InputList_Process())
436  {
437  /* Needs reboot */
438  WCHAR szNeedsReboot[128], szLanguage[64];
439  LoadStringW(hApplet, IDS_REBOOT_NOW, szNeedsReboot, _countof(szNeedsReboot));
440  LoadStringW(hApplet, IDS_LANGUAGE, szLanguage, _countof(szLanguage));
441 
442  if (MessageBoxW(hwndDlg, szNeedsReboot, szLanguage,
444  {
447  }
448  }
449  }
450  break;
451  }
452 }
453 
454 
457 {
458  switch (uMsg)
459  {
460  case WM_INITDIALOG:
461  OnInitSettingsPage(hwndDlg);
462  break;
463 
464  case WM_DESTROY:
465  OnDestroySettingsPage(hwndDlg);
466  break;
467 
468  case WM_COMMAND:
469  OnCommandSettingsPage(hwndDlg, wParam);
470  break;
471 
472  case WM_NOTIFY:
473  OnNotifySettingsPage(hwndDlg, lParam);
474  break;
475  }
476 
477  return FALSE;
478 }
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:893
#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:769
#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:505
#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:884
#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