ReactOS  0.4.14-dev-593-g1793dcc
advanced.c
Go to the documentation of this file.
1 #include "intl.h"
2 #include <wingdi.h>
3 
4 #include <debug.h>
5 
6 typedef struct CPStruct
7 {
11  struct CPStruct *NextItem;
12 } CPAGE, *PCPAGE;
13 
14 #define CODEPAGE_INSTALLED 0x00000001
15 #define CODEPAGE_NOT_REMOVEABLE 0x00000002
16 #define CODEPAGE_INSTALL 0x00000004
17 #define CODEPAGE_REMOVE 0x00000008
18 
19 static PCPAGE PCPage = NULL;
20 static BOOL bSpain = FALSE;
21 static HWND hLangList;
22 
23 static BOOL
25  HINF hInf)
26 {
27  WCHAR szSection[MAX_PATH];
29  PCPAGE pCodePage;
30  CPINFOEX cpInfEx;
31  UINT uiCodePage;
32 
33  if (!SetupFindFirstLine(hInf,
34  L"CodePages",
35  NULL,
36  &Context))
37  return FALSE;
38 
39  for (;;)
40  {
41  if (SetupGetIntField(&Context, 0, (PINT)&uiCodePage))
42  {
43  pCodePage = HeapAlloc(GetProcessHeap(), 0, sizeof(CPAGE));
44  if (pCodePage == NULL)
45  return FALSE;
46 
47  pCodePage->CodePage = uiCodePage;
48  pCodePage->Flags = 0;
49  (pCodePage->Name)[0] = UNICODE_NULL;
50 
51  if (GetCPInfoExW(uiCodePage, 0, &cpInfEx))
52  {
53  wcscpy(pCodePage->Name, cpInfEx.CodePageName);
54  }
55  else
56  {
57  SetupGetStringFieldW(&Context, 1, pCodePage->Name, MAX_PATH, NULL);
58  }
59 
60  if (wcslen(pCodePage->Name) != 0)
61  {
62  pCodePage->NextItem = PCPage;
63  PCPage = pCodePage;
64 
65  wsprintf(szSection, L"CODEPAGE_REMOVE_%d", uiCodePage);
66 
67  if ((uiCodePage == GetACP()) ||
68  (uiCodePage == GetOEMCP()) ||
69  (!SetupFindFirstLineW(hInf, szSection, L"AddReg", &Context2)))
70  {
71  pCodePage->Flags |= CODEPAGE_NOT_REMOVEABLE;
72  }
73  }
74  else
75  {
76  HeapFree(GetProcessHeap(), 0, pCodePage);
77  }
78  }
79 
81  break;
82  }
83 
84  return TRUE;
85 }
86 
87 static BOOL CALLBACK
89 {
90  PCPAGE lpCP;
91  UINT uiCP;
92 
93  lpCP = PCPage;
94  uiCP = _wtol(lpStr);
95 
96  for (;;)
97  {
98  if (!lpCP)
99  break;
100 
101  if (lpCP->CodePage == uiCP)
102  {
103  lpCP->Flags |= CODEPAGE_INSTALLED;
104  break;
105  }
106 
107  lpCP = lpCP->NextItem;
108  }
109 
110  return TRUE;
111 }
112 
113 static VOID
115 {
116  PCPAGE pCodePage;
117  INT ItemIndex;
118  HWND hList;
120  LV_ITEM item;
121  RECT ListRect;
122  HINF hIntlInf;
123 
124  hIntlInf = SetupOpenInfFileW(L"intl.inf", NULL, INF_STYLE_WIN4, NULL);
125  if (hIntlInf == INVALID_HANDLE_VALUE)
126  return;
127 
128  if (!SetupOpenAppendInfFile(NULL, hIntlInf, NULL))
129  {
130  SetupCloseInfFile(hIntlInf);
131  hIntlInf = NULL;
132  return;
133  }
134 
135  if (!GetSupportedCP(hIntlInf))
136  return;
137 
138  SetupCloseInfFile(hIntlInf);
139 
141  {
142  /* Hack: EnumSystemCodePages returns FALSE on successful completion! */
143  /* return; */
144  }
145 
146  hList = GetDlgItem(hwndDlg, IDC_CONV_TABLES);
147 
148  ZeroMemory(&column, sizeof(LV_COLUMN));
149  column.mask = LVCF_FMT | LVCF_WIDTH;
150  column.fmt = LVCFMT_LEFT;
151  GetClientRect(hList, &ListRect);
152  column.cx = ListRect.right - GetSystemMetrics(SM_CYHSCROLL);
154 
156 
157  pCodePage = PCPage;
158 
159  for (;;)
160  {
161  if (pCodePage == NULL)
162  break;
163 
164  ZeroMemory(&item, sizeof(LV_ITEM));
165  item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE;
166  item.state = 0;
167  item.stateMask = LVIS_STATEIMAGEMASK;
168  item.pszText = pCodePage->Name;
169  item.lParam = (LPARAM)pCodePage;
170 
171  ItemIndex = ListView_InsertItem(hList, &item);
172  if (ItemIndex != -1)
173  {
174  if (pCodePage->Flags & CODEPAGE_INSTALLED)
175  {
176  ListView_SetItemState(hList, ItemIndex,
179  }
180  else
181  {
182  ListView_SetItemState(hList, ItemIndex,
185  }
186  }
187 
188  pCodePage = pCodePage->NextItem;
189  }
190 }
191 
192 static BOOL CALLBACK
194 {
195  LCID lcid;
196  WCHAR lang[255];
197  INT index;
198  BOOL bNoShow = FALSE;
199 
200  lcid = wcstoul(lpLocale, NULL, 16);
201 
204  {
205  if (bSpain == FALSE)
206  {
208  bSpain = TRUE;
209  }
210  else
211  {
212  bNoShow = TRUE;
213  }
214  }
215  else
216  {
217  GetLocaleInfoW(lcid, LOCALE_SLANGUAGE, lang, sizeof(lang)/sizeof(WCHAR));
218  }
219 
220  if (bNoShow == FALSE)
221  {
223  CB_ADDSTRING,
224  0,
225  (LPARAM)lang);
226 
229  index,
230  (LPARAM)lcid);
231  }
232 
233  return TRUE;
234 }
235 
236 static VOID
238  HWND hwndDlg,
239  PGLOBALDATA pGlobalData)
240 {
241  WCHAR langSel[255];
242 
244 
245  bSpain = FALSE;
247 
248  /* Select current locale */
249  GetLocaleInfoW(pGlobalData->SystemLCID, LOCALE_SLANGUAGE, langSel, sizeof(langSel)/sizeof(WCHAR));
250 
252 }
253 
254 static VOID
256 {
257  DWORD dwType, dwSize, dwDPI, dwDefDPI = 0x00000060; // Default 96 DPI
258  HKEY hKey;
259 
260  if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontDPI", 0, NULL,
262  {
263  wcscpy(szDPI, L"96");
264  return;
265  }
266 
267  dwType = REG_DWORD;
268  dwSize = sizeof(DWORD);
269 
270  if (RegQueryValueExW(hKey, L"LogPixels", NULL, &dwType, (LPBYTE)&dwDPI, &dwSize) != ERROR_SUCCESS)
271  {
272  if (RegSetValueExW(hKey, L"LogPixels", 0, REG_DWORD, (LPBYTE)&dwDefDPI, sizeof(DWORD)) == ERROR_SUCCESS)
273  {
274  wcscpy(szDPI, L"96");
275  RegCloseKey(hKey);
276  return;
277  }
278  }
279  else
280  {
281  wsprintf(szDPI, L"%d", dwDPI);
282  }
283 
284  RegCloseKey(hKey);
285 }
286 
287 static
288 VOID
290  HWND hwnd,
291  PGLOBALDATA pGlobalData)
292 {
293  WCHAR szDefCP[5 + 1], szSection[MAX_PATH], szDPI[3 + 1];
294  HINF hFontInf;
295  UINT Count;
296 
297  GetLocaleInfoW(MAKELCID(pGlobalData->SystemLCID, SORT_DEFAULT), LOCALE_IDEFAULTCODEPAGE, szDefCP, sizeof(szDefCP) / sizeof(WCHAR));
298  GetCurrentDPI(szDPI);
299 
300  wsprintf(szSection, L"Font.CP%s.%s", szDefCP, szDPI);
301 
302  hFontInf = SetupOpenInfFileW(L"font.inf", NULL, INF_STYLE_WIN4, NULL);
303  if (hFontInf == INVALID_HANDLE_VALUE)
304  return;
305 
306  if (!SetupOpenAppendInfFile(NULL, hFontInf, NULL))
307  {
308  SetupCloseInfFile(hFontInf);
309  return;
310  }
311 
312  Count = (UINT)SetupGetLineCount(hFontInf, szSection);
313  if (Count <= 0)
314  return;
315 
316  if (!SetupInstallFromInfSectionW(hwnd, hFontInf, szSection, SPINST_REGISTRY & ~SPINST_FILES,
317  NULL, NULL, 0, NULL, NULL, NULL, NULL))
318  {
319  MessageBoxW(hwnd, L"Unable to install a new language for programs don't support unicode!",
320  NULL, MB_ICONERROR | MB_OK);
321  }
322 
323  SetupCloseInfFile(hFontInf);
324 }
325 
326 
327 static
328 VOID
330  HWND hwnd,
331  PGLOBALDATA pGlobalData)
332 {
333  /* TODO */
334 }
335 
336 
337 static
338 VOID
340  PGLOBALDATA pGlobalData)
341 {
342  WCHAR ACPPage[9];
343  WCHAR OEMPage[9];
344  HKEY langKey;
345  DWORD ret;
346  WCHAR value[5];
347  DWORD valuesize;
348 
349  ret = GetLocaleInfoW(MAKELCID(pGlobalData->SystemLCID, SORT_DEFAULT), LOCALE_IDEFAULTCODEPAGE, OEMPage, sizeof(OEMPage)/sizeof(WCHAR));
350  if (ret == 0)
351  {
353  return;
354  }
355 
356  ret = GetLocaleInfoW(MAKELCID(pGlobalData->SystemLCID, SORT_DEFAULT), LOCALE_IDEFAULTANSICODEPAGE, ACPPage, sizeof(ACPPage)/sizeof(WCHAR));
357  if (ret == 0)
358  {
360  return;
361  }
362 
363  /* Set codepages */
364  ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage", &langKey);
365  if (ret != ERROR_SUCCESS)
366  {
368  return;
369  }
370 
371  RegSetValueExW(langKey, L"OEMCP", 0, REG_SZ, (BYTE *)OEMPage, (wcslen(OEMPage) +1 ) * sizeof(WCHAR));
372  RegSetValueExW(langKey, L"ACP", 0, REG_SZ, (BYTE *)ACPPage, (wcslen(ACPPage) +1 ) * sizeof(WCHAR));
373 
374  RegCloseKey(langKey);
375 
376 
377  wsprintf(value, L"%04hX", LANGIDFROMLCID(pGlobalData->SystemLCID));
378  valuesize = (wcslen(value) + 1) * sizeof(WCHAR);
379 
380  /* Set language */
381  ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\NLS\\Language", &langKey);
382  if (ret != ERROR_SUCCESS)
383  {
385  return;
386  }
387 
388  RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, valuesize);
389  RegCloseKey(langKey);
390 }
391 
392 
393 LRESULT
395  LPARAM lParam)
396 {
398 
399  switch (lplvcd->nmcd.dwDrawStage)
400  {
401  case CDDS_PREPAINT:
402  return CDRF_NOTIFYITEMDRAW;
403 
404  case CDDS_ITEMPREPAINT:
405  if (((PCPAGE)lplvcd->nmcd.lItemlParam)->Flags & CODEPAGE_NOT_REMOVEABLE)
406  {
408  }
409  else
410  {
412  }
414  return CDRF_NEWFONT;
415  }
416 
417  return CDRF_DODEFAULT;
418 }
419 
420 
421 /* Property page dialog callback */
424  UINT uMsg,
425  WPARAM wParam,
426  LPARAM lParam)
427 {
428  PGLOBALDATA pGlobalData;
429 
430  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
431 
432  switch (uMsg)
433  {
434  case WM_INITDIALOG:
435  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
436  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
437 
438  InitLanguagesList(hwndDlg, pGlobalData);
439  InitCodePagesList(hwndDlg);
440  break;
441 
442  case WM_COMMAND:
443  switch (LOWORD(wParam))
444  {
445  case IDC_LANGUAGE_COMBO:
446  if (HIWORD(wParam) == CBN_SELCHANGE)
447  {
448  LCID lcid;
449  INT iIndex;
450 
451  iIndex = SendMessage(hLangList, CB_GETCURSEL, 0, 0);
452  if (iIndex == CB_ERR)
453  break;
454 
455  lcid = SendMessage(hLangList, CB_GETITEMDATA, iIndex, 0);
456  if (lcid == (LCID)CB_ERR)
457  break;
458 
459  pGlobalData->SystemLCID = lcid;
460 
461  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
462  }
463  break;
464 
466  if (HIWORD(wParam) == BN_CLICKED)
467  {
469  {
470  ResourceMessageBox(hwndDlg,
474  pGlobalData->bApplyToDefaultUser = TRUE;
475  }
476  else
477  {
478  pGlobalData->bApplyToDefaultUser = FALSE;
479  }
480 
481  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
482  }
483  break;
484  }
485  break;
486 
487  case WM_NOTIFY:
488  if (((LPNMHDR)lParam)->code == PSN_APPLY)
489  {
490  PropSheet_UnChanged(GetParent(hwndDlg), hwndDlg);
491 
492  SaveSystemSettings(pGlobalData);
493  SaveFontSubstitutionSettings(hwndDlg, pGlobalData);
494  SaveFontLinkingSettings(hwndDlg, pGlobalData);
495  }
496  else if (((LPNMHDR)lParam)->idFrom == IDC_CONV_TABLES &&
498  {
499  SetWindowLongPtr(hwndDlg,
502  return TRUE;
503  }
504  break;
505  }
506 
507  return FALSE;
508 }
509 
510 /* EOF */
BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW lpCodePageEnumProc, DWORD dwFlags)
Definition: lang.c:3231
struct CPStruct CPAGE
#define LV_ITEM
Definition: commctrl.h:2333
TCHAR langSel[255]
Definition: powercfg.c:24
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
Definition: infsupp.c:54
#define CB_SETITEMDATA
Definition: winuser.h:1948
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
struct _GLOBALDATA * PGLOBALDATA
static VOID GetCurrentDPI(LPTSTR szDPI)
Definition: advanced.c:255
#define LOCALE_IDEFAULTANSICODEPAGE
Definition: winnls.h:38
#define MAKELCID(lgid, srtid)
#define SM_CYHSCROLL
Definition: winuser.h:952
#define TRUE
Definition: types.h:120
#define LVCF_WIDTH
Definition: commctrl.h:2583
struct CPStruct * NextItem
Definition: advanced.c:11
#define INF_STYLE_WIN4
Definition: infsupp.h:41
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LOCALE_SLANGUAGE
Definition: winnls.h:26
#define SetupOpenAppendInfFile
Definition: setupapi.h:2646
static VOID SaveFontSubstitutionSettings(HWND hwnd, PGLOBALDATA pGlobalData)
Definition: advanced.c:289
static PCPAGE PCPage
Definition: advanced.c:19
#define SetupFindFirstLine
Definition: setupapi.h:2619
uint16_t * PWSTR
Definition: typedefs.h:54
WCHAR Name[MAX_PATH]
Definition: advanced.c:10
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define LV_COLUMN
Definition: commctrl.h:2543
#define CALLBACK
Definition: compat.h:27
#define IDS_ERROR_ANSI_CODE_PAGE
Definition: resource.h:81
#define SUBLANG_SPANISH_MODERN
Definition: nls.h:338
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2730
#define LVCFMT_LEFT
Definition: commctrl.h:2594
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
#define CDDS_ITEMPREPAINT
Definition: commctrl.h:281
#define IDC_CONV_TABLES
Definition: resource.h:69
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#define ZeroMemory
Definition: winbase.h:1642
HINSTANCE hApplet
Definition: access.c:17
struct tagNMLVCUSTOMDRAW * LPNMLVCUSTOMDRAW
DWORD LCID
Definition: nls.h:13
UINT_PTR WPARAM
Definition: windef.h:207
struct CPStruct * PCPAGE
#define PSN_APPLY
Definition: prsht.h:117
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2404
static VOID InitLanguagesList(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: advanced.c:237
int32_t INT_PTR
Definition: typedefs.h:62
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
static VOID SaveFontLinkingSettings(HWND hwnd, PGLOBALDATA pGlobalData)
Definition: advanced.c:329
LONG right
Definition: windef.h:308
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
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
#define CB_GETCURSEL
Definition: winuser.h:1925
DWORD WINAPI GetSysColor(_In_ int)
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define DWLP_MSGRESULT
Definition: winuser.h:864
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:43
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1091
#define MB_ICONWARNING
Definition: winuser.h:780
#define IDC_APPLY_CUR_USER_DEF_PROFILE
Definition: resource.h:68
UINT CodePage
Definition: advanced.c:8
#define LVIF_TEXT
Definition: commctrl.h:2305
#define CODEPAGE_INSTALLED
Definition: advanced.c:14
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: lang.c:1098
COLORREF clrText
Definition: commctrl.h:3059
#define IDS_SPAIN
Definition: resource.h:32
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2632
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
#define UNICODE_NULL
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2669
NMCUSTOMDRAW nmcd
Definition: commctrl.h:3058
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDS_ERROR_NLS_KEY_REG
Definition: resource.h:84
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
#define CB_ADDSTRING
Definition: winuser.h:1918
#define IDC_LANGUAGE_COMBO
Definition: resource.h:53
#define SPINST_REGISTRY
Definition: setupapi.h:585
#define LPPROPSHEETPAGE
Definition: prsht.h:372
smooth NULL
Definition: ftsmooth.c:416
#define LVIS_SELECTED
Definition: commctrl.h:2315
UINT WINAPI GetACP(VOID)
Definition: nls.c:2180
LONG_PTR LPARAM
Definition: windef.h:208
#define BM_GETCHECK
Definition: winuser.h:1900
#define CDRF_NOTIFYITEMDRAW
Definition: commctrl.h:271
GLuint index
Definition: glext.h:6031
DWORD Flags
Definition: advanced.c:9
#define LVIS_STATEIMAGEMASK
Definition: commctrl.h:2322
BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
Definition: lang.c:1604
#define SPINST_FILES
Definition: setupapi.h:587
static VOID InitCodePagesList(HWND hwndDlg)
Definition: advanced.c:114
#define CB_ERR
Definition: winuser.h:2410
static const WCHAR lang[]
Definition: wbemdisp.c:287
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4895
#define IDS_APPLY_DEFAULT_TEXT
Definition: resource.h:94
#define IDS_ERROR_NLS_CODE_REG
Definition: resource.h:85
static BOOL GetSupportedCP(HINF hInf)
Definition: advanced.c:24
int * PINT
Definition: windef.h:177
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LCID SystemLCID
Definition: intl.h:114
VOID ResourceMessageBox(HINSTANCE hInstance, HWND hwnd, UINT uType, UINT uCaptionId, UINT uMessageId)
Definition: misc.c:283
#define IDS_APPLY_DEFAULT_TITLE
Definition: resource.h:93
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
#define PropSheet_UnChanged(d, w)
Definition: prsht.h:340
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PropSheet_Changed(d, w)
Definition: prsht.h:326
#define SORT_DEFAULT
#define COLOR_WINDOWTEXT
Definition: winuser.h:911
#define INDEXTOSTATEIMAGEMASK(i)
Definition: commctrl.h:2324
#define MAX_PATH
Definition: compat.h:26
int WINAPI GetSystemMetrics(_In_ int)
#define BN_CLICKED
Definition: winuser.h:1907
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL CALLBACK InstalledCPProc(PWSTR lpStr)
Definition: advanced.c:88
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2721
#define CDRF_DODEFAULT
Definition: commctrl.h:264
static HWND hLangList
Definition: advanced.c:21
#define CODEPAGE_NOT_REMOVEABLE
Definition: advanced.c:15
BOOL WINAPI SetupInstallFromInfSectionW(HWND owner, HINF hinf, PCWSTR section, UINT flags, HKEY key_root, PCWSTR src_root, UINT copy_flags, PSP_FILE_CALLBACK_W callback, PVOID context, HDEVINFO devinfo, PSP_DEVINFO_DATA devinfo_data)
Definition: install.c:1327
int ret
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define CDDS_PREPAINT
Definition: commctrl.h:276
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define COLOR_GRAYTEXT
Definition: winuser.h:922
CHAR CodePageName[MAX_PATH]
Definition: winnls.h:588
#define index(s, c)
Definition: various.h:29
static const WCHAR L[]
Definition: oid.c:1250
#define LVS_EX_CHECKBOXES
Definition: commctrl.h:2727
#define DWLP_USER
Definition: winuser.h:866
#define CB_SELECTSTRING
Definition: winuser.h:1942
#define MB_ICONERROR
Definition: winuser.h:781
#define VOID
Definition: acefi.h:82
#define LANGIDFROMLCID(l)
Definition: nls.h:18
unsigned char BYTE
Definition: mem.h:68
#define CP_INSTALLED
Definition: winnls.h:196
#define WM_COMMAND
Definition: winuser.h:1722
#define LOCALE_IDEFAULTCODEPAGE
Definition: winnls.h:37
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT _In_ PTDI_PNP_CONTEXT Context2
Definition: tdikrnl.h:1094
#define IDS_ERROR_OEM_CODE_PAGE
Definition: resource.h:86
#define SUBLANG_SPANISH
Definition: nls.h:336
HWND hList
Definition: livecd.c:10
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
#define LVCF_FMT
Definition: commctrl.h:2582
static VOID SaveSystemSettings(PGLOBALDATA pGlobalData)
Definition: advanced.c:339
static ATOM item
Definition: dde.c:856
static BOOL CALLBACK LocalesEnumProc(PWSTR lpLocale)
Definition: advanced.c:193
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
_Check_return_ _CRTIMP long __cdecl _wtol(_In_z_ const wchar_t *_Str)
#define MB_OK
Definition: winuser.h:784
#define CBN_SELCHANGE
Definition: winuser.h:1961
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
Definition: infsupp.c:80
BOOL WINAPI SetupGetIntField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
Definition: infsupp.c:146
#define SendMessage
Definition: winuser.h:5818
#define SetupGetLineCount
Definition: setupapi.h:2628
#define CDRF_NEWFONT
Definition: commctrl.h:265
#define LVIF_PARAM
Definition: commctrl.h:2307
struct tagContext Context
Definition: acpixf.h:1030
#define HIWORD(l)
Definition: typedefs.h:246
#define MAKELANGID(p, s)
Definition: nls.h:15
BOOL WINAPI GetCPInfoExW(UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx)
Definition: nls.c:1969
COLORREF clrTextBk
Definition: commctrl.h:3060
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:5664
#define GetWindowLongPtr
Definition: treelist.c:73
LRESULT ListViewCustomDraw(LPARAM lParam)
Definition: advanced.c:394
#define LVIF_STATE
Definition: commctrl.h:2308
LONG_PTR LRESULT
Definition: windef.h:209
#define wsprintf
Definition: winuser.h:5840
VOID PrintErrorMsgBox(UINT msg)
Definition: intl.c:52
#define REG_DWORD
Definition: sdbapi.c:596
#define LANG_SPANISH
Definition: nls.h:123
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
static BOOL bSpain
Definition: advanced.c:20
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:402
INT_PTR CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:423
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
#define LCID_SUPPORTED
Definition: winnls.h:199
#define LVIS_FOCUSED
Definition: commctrl.h:2314
#define WM_NOTIFY
Definition: richedit.h:61
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
UINT WINAPI GetOEMCP(VOID)
Definition: nls.c:2195
#define REG_SZ
Definition: layer.c:22
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:184