ReactOS  0.4.14-dev-115-g4576127
numbers.c
Go to the documentation of this file.
1 /*
2  * ReactOS
3  * Copyright (C) 2004 ReactOS Team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 /*
20  * PROJECT: ReactOS International Control Panel
21  * FILE: dll/cpl/intl/numbers.c
22  * PURPOSE: Numbers property page
23  * PROGRAMMERS: Eric Kohl
24  * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
25  */
26 
27 #include "intl.h"
28 
29 #define SAMPLE_NUMBER L"123456789"
30 #define SAMPLE_NEG_NUMBER L"-123456789"
31 #define MAX_NUM_SEP_SAMPLES 2
32 #define MAX_FRAC_NUM_SAMPLES 10
33 #define MAX_FIELD_SEP_SAMPLES 1
34 #define MAX_FIELD_DIG_SAMPLES 3
35 #define MAX_NEG_SIGN_SAMPLES 1
36 #define MAX_NEG_NUMBERS_SAMPLES 5
37 #define MAX_LEAD_ZEROES_SAMPLES 2
38 #define MAX_LIST_SEP_SAMPLES 1
39 #define MAX_UNITS_SYS_SAMPLES 2
40 
42  {L",", L"."};
44  {L" "};
46  {L"0;0", L"3;0", L"3;2;0"};
48  {L"-"};
50  {L"(1,1)", L"-1,1", L"- 1,1", L"1,1-", L"1,1 -"};
52  {L",7", L"0,7"};
54  {L";"};
55 
56 
57 /* Init num decimal separator control box */
58 static VOID
59 InitNumDecimalSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
60 {
61  INT nCBIndex;
62  INT nRetCode;
63 
64  /* Limit text length */
68  0);
69 
70  /* Clear all box content */
73  (WPARAM)0,
74  (LPARAM)0);
75 
76  /* Create standard list of decimal separators */
77  for (nCBIndex = 0; nCBIndex < MAX_NUM_SEP_SAMPLES; nCBIndex++)
78  {
81  0,
82  (LPARAM)lpNumSepSamples[nCBIndex]);
83  }
84 
85  /* Set current item to value from registry */
86  nRetCode = SendDlgItemMessageW(hwndDlg, IDC_NUMBERDSYMBOL,
88  -1,
89  (LPARAM)pGlobalData->szNumDecimalSep);
90 
91  /* If it is not successful, add new values to list and select them */
92  if (nRetCode == CB_ERR)
93  {
97  (LPARAM)pGlobalData->szNumDecimalSep);
100  -1,
101  (LPARAM)pGlobalData->szNumDecimalSep);
102  }
103 }
104 
105 /* Init number of fractional symbols control box */
106 static VOID
107 InitNumOfFracSymbCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
108 {
109  WCHAR szFracCount[MAX_SAMPLES_STR_SIZE];
110  INT nCBIndex;
111 
112  /* Clear all box content */
115  (WPARAM)0,
116  (LPARAM)0);
117 
118  /* Create standard list of fractional symbols */
119  for (nCBIndex = 0; nCBIndex < MAX_FRAC_NUM_SAMPLES; nCBIndex++)
120  {
121  /* Convert to wide char */
122  _itow(nCBIndex, szFracCount, DECIMAL_RADIX);
123 
125  CB_ADDSTRING,
126  0,
127  (LPARAM)szFracCount);
128  }
129 
130  /* Set current item to value from registry */
132  CB_SETCURSEL,
133  (WPARAM)pGlobalData->nNumDigits,
134  (LPARAM)0);
135 }
136 
137 /* Init field separator control box */
138 static VOID
139 InitNumFieldSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
140 {
141  INT nCBIndex;
142  INT nRetCode;
143 
144  /* Limit text length */
146  CB_LIMITTEXT,
147  MAX_NUMTHOUSANDSEP - 1,
148  0);
149 
150  /* Clear all box content */
153  (WPARAM)0,
154  (LPARAM)0);
155 
156  /* Create standard list of field separators */
157  for (nCBIndex = 0; nCBIndex < MAX_FIELD_SEP_SAMPLES; nCBIndex++)
158  {
160  CB_ADDSTRING,
161  0,
162  (LPARAM)lpFieldSepSamples[nCBIndex]);
163  }
164 
165  /* Set current item to value from registry */
166  nRetCode = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSDIGITGRSYM,
168  -1,
169  (LPARAM)pGlobalData->szNumThousandSep);
170 
171  /* If it is not success, add new values to list and select them */
172  if (nRetCode == CB_ERR)
173  {
175  CB_ADDSTRING,
176  0,
177  (LPARAM)pGlobalData->szNumThousandSep);
180  -1,
181  (LPARAM)pGlobalData->szNumThousandSep);
182  }
183 }
184 
185 /* Init number of digits in field control box */
186 static VOID
187 InitFieldDigNumCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
188 {
189  PWSTR pszFieldDigNumSmpl;
190  INT nCBIndex;
191 
192  /* Clear all box content */
195  (WPARAM)0,
196  (LPARAM)0);
197 
198  /* Create standard list of field digits num */
199  for (nCBIndex = 0; nCBIndex < MAX_FIELD_DIG_SAMPLES; nCBIndex++)
200  {
201  pszFieldDigNumSmpl = InsSpacesFmt(SAMPLE_NUMBER, lpFieldDigNumSamples[nCBIndex]);
202  if (pszFieldDigNumSmpl != NULL)
203  {
205  CB_ADDSTRING,
206  0,
207  (LPARAM)pszFieldDigNumSmpl);
208  HeapFree(GetProcessHeap(), 0, pszFieldDigNumSmpl);
209  }
210  }
211 
213  CB_SETCURSEL,
214  (WPARAM)pGlobalData->nNumGrouping,
215  (LPARAM)0);
216 }
217 
218 /* Init negative sign control box */
219 static VOID
220 InitNegSignCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
221 {
222  INT nCBIndex;
223  INT nRetCode;
224 
225  /* Limit text length */
227  CB_LIMITTEXT,
229  0);
230 
231  /* Clear all box content */
234  (WPARAM)0,
235  (LPARAM)0);
236 
237  /* Create standard list of signs */
238  for (nCBIndex = 0; nCBIndex < MAX_NEG_SIGN_SAMPLES; nCBIndex++)
239  {
241  CB_ADDSTRING,
242  0,
243  (LPARAM)lpNegSignSamples[nCBIndex]);
244  }
245 
246  /* Set current item to value from registry */
247  nRetCode = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSNSIGNSYM,
249  -1,
250  (LPARAM)pGlobalData->szNumNegativeSign);
251 
252  /* If it is not successful, add new values to list and select them */
253  if (nRetCode == CB_ERR)
254  {
256  CB_ADDSTRING,
257  0,
258  (LPARAM)pGlobalData->szNumNegativeSign);
261  -1,
262  (LPARAM)pGlobalData->szNumNegativeSign);
263  }
264 }
265 
266 /* Init negative numbers format control box */
267 static VOID
268 InitNegNumFmtCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
269 {
270  PWSTR pszString1, pszString2;
271  INT nCBIndex;
272 
273  /* Clear all box content */
276  (WPARAM)0,
277  (LPARAM)0);
278 
279  /* Create standard list of negative numbers formats */
280  for (nCBIndex = 0; nCBIndex < MAX_NEG_NUMBERS_SAMPLES; nCBIndex++)
281  {
282  /* Replace standard separator to setted */
283  pszString1 = ReplaceSubStr(lpNegNumFmtSamples[nCBIndex],
284  pGlobalData->szNumDecimalSep,
285  L",");
286  if (pszString1 != NULL)
287  {
288  /* Replace standard negative sign to setted */
289  pszString2 = ReplaceSubStr(pszString1,
290  pGlobalData->szNumNegativeSign,
291  L"-");
292  if (pszString2 != NULL)
293  {
295  CB_ADDSTRING,
296  0,
297  (LPARAM)pszString2);
298 
299  HeapFree(GetProcessHeap(), 0, pszString2);
300  }
301 
302  HeapFree(GetProcessHeap(), 0, pszString1);
303  }
304  }
305 
306  /* Set current item to value from registry */
308  CB_SETCURSEL,
309  (WPARAM)pGlobalData->nNumNegFormat,
310  (LPARAM)0);
311 }
312 
313 /* Init leading zeroes control box */
314 static VOID
315 InitLeadingZeroesCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
316 {
317  PWSTR pszResultStr;
318  INT nCBIndex;
319 
320  /* Clear all box content */
323  (WPARAM)0,
324  (LPARAM)0);
325 
326  /* Create list of standard leading zeroes formats */
327  for (nCBIndex = 0; nCBIndex < MAX_LEAD_ZEROES_SAMPLES; nCBIndex++)
328  {
329  pszResultStr = ReplaceSubStr(lpLeadNumFmtSamples[nCBIndex],
330  pGlobalData->szNumDecimalSep,
331  L",");
332  if (pszResultStr != NULL)
333  {
335  CB_ADDSTRING,
336  0,
337  (LPARAM)pszResultStr);
338  HeapFree(GetProcessHeap(), 0, pszResultStr);
339  }
340  }
341 
342  /* Set current item to value from registry */
344  CB_SETCURSEL,
345  (WPARAM)pGlobalData->nNumLeadingZero,
346  (LPARAM)0);
347 }
348 
349 static VOID
351  PGLOBALDATA pGlobalData)
352 {
353  INT nCBIndex;
354  INT nRetCode;
355 
356  /* Limit text length */
358  CB_LIMITTEXT,
359  MAX_NUMLISTSEP - 1,
360  0);
361 
362  /* Clear all box content */
365  (WPARAM)0,
366  (LPARAM)0);
367 
368  /* Create standard list of signs */
369  for (nCBIndex = 0; nCBIndex < MAX_LIST_SEP_SAMPLES; nCBIndex++)
370  {
372  CB_ADDSTRING,
373  0,
374  (LPARAM)lpListSepSamples[nCBIndex]);
375  }
376 
377  /* Set current item to value from registry */
378  nRetCode = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSLSEP,
380  -1,
381  (LPARAM)pGlobalData->szNumListSep);
382 
383  /* If it is not successful, add new values to list and select them */
384  if (nRetCode == CB_ERR)
385  {
387  CB_ADDSTRING,
388  0,
389  (LPARAM)pGlobalData->szNumListSep);
392  -1,
393  (LPARAM)pGlobalData->szNumListSep);
394  }
395 }
396 
397 /* Init system of units control box */
398 static VOID
400  PGLOBALDATA pGlobalData)
401 {
402  WCHAR szUnitName[128];
403  INT nCBIndex;
404 
405  /* Clear all box content */
408  (WPARAM)0,
409  (LPARAM)0);
410 
411  /* Create list of standard system of units */
412  for (nCBIndex = 0; nCBIndex < MAX_UNITS_SYS_SAMPLES; nCBIndex++)
413  {
414  LoadStringW(hApplet, IDS_METRIC + nCBIndex, szUnitName, 128);
415 
417  CB_ADDSTRING,
418  0,
419  (LPARAM)szUnitName);
420  }
421 
422  /* Set current item to value from registry */
424  CB_SETCURSEL,
425  (WPARAM)pGlobalData->nNumMeasure,
426  (LPARAM)0);
427 }
428 
429 /* Update all numbers locale samples */
430 static VOID
432  PGLOBALDATA pGlobalData)
433 {
434  WCHAR OutBuffer[MAX_FMT_SIZE];
435  NUMBERFMT NumberFormat;
436 
437  NumberFormat.NumDigits = pGlobalData->nNumDigits;
438  NumberFormat.LeadingZero = pGlobalData->nNumLeadingZero;
439  NumberFormat.Grouping = GroupingFormats[pGlobalData->nNumGrouping].nInteger;
440  NumberFormat.lpDecimalSep = pGlobalData->szNumDecimalSep;
441  NumberFormat.lpThousandSep = pGlobalData->szNumThousandSep;
442  NumberFormat.NegativeOrder = pGlobalData->nNumNegFormat;
443 
444  /* Get positive number format sample */
445  GetNumberFormatW(pGlobalData->UserLCID,
446  0,
448  &NumberFormat,
449  OutBuffer,
450  MAX_FMT_SIZE);
451 
453  WM_SETTEXT,
454  0,
455  (LPARAM)OutBuffer);
456 
457  /* Get positive number format sample */
458  GetNumberFormatW(pGlobalData->UserLCID,
459  0,
461  &NumberFormat,
462  OutBuffer,
463  MAX_FMT_SIZE);
464 
466  WM_SETTEXT,
467  0,
468  (LPARAM)OutBuffer);
469 }
470 
471 
472 static
473 BOOL
475  HWND hwndDlg,
476  PGLOBALDATA pGlobalData)
477 {
478  WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP];
479  WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP];
480  WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN];
481  WCHAR szNumListSep[MAX_NUMLISTSEP];
482  INT nNumDigits;
483  INT nNumGrouping;
484  INT nNumNegFormat;
485  INT nNumLeadingZero;
486  INT nNumMeasure;
487 
488  /* Decimal symbol */
489  GetSelectedComboBoxText(hwndDlg,
491  szNumDecimalSep,
493 
494  if (szNumDecimalSep[0] == L'\0')
495  {
496  /* TODO: Show error message */
497 
498  return FALSE;
499  }
500 
501  /* Number of digits after decimal */
502  GetSelectedComboBoxIndex(hwndDlg,
504  &nNumDigits);
505 
506  /* Digit grouping symbol */
507  GetSelectedComboBoxText(hwndDlg,
509  szNumThousandSep,
511 
512  if (szNumThousandSep[0] == L'\0')
513  {
514  /* TODO: Show error message */
515 
516  return FALSE;
517  }
518 
519  /* Digit grouping */
520  GetSelectedComboBoxIndex(hwndDlg,
522  &nNumGrouping);
523 
524  /* Negative sign symbol */
525  GetSelectedComboBoxText(hwndDlg,
527  szNumNegativeSign,
529 
530  if (szNumNegativeSign[0] == L'\0')
531  {
532  /* TODO: Show error message */
533 
534  return FALSE;
535  }
536 
537  /* Negative number format */
538  GetSelectedComboBoxIndex(hwndDlg,
540  &nNumNegFormat);
541 
542  /* Display leading zeros */
543  GetSelectedComboBoxIndex(hwndDlg,
545  &nNumLeadingZero);
546 
547  /* List separator */
548  GetSelectedComboBoxText(hwndDlg,
550  szNumListSep,
552 
553  if (szNumListSep[0] == L'\0')
554  {
555  /* TODO: Show error message */
556 
557  return FALSE;
558  }
559 
560  /* Measurement system */
561  GetSelectedComboBoxIndex(hwndDlg,
563  &nNumMeasure);
564 
565  /* Store settings in global data */
566  wcscpy(pGlobalData->szNumDecimalSep, szNumDecimalSep);
567  wcscpy(pGlobalData->szNumThousandSep, szNumThousandSep);
568  wcscpy(pGlobalData->szNumNegativeSign, szNumNegativeSign);
569  wcscpy(pGlobalData->szNumListSep, szNumListSep);
570  pGlobalData->nNumGrouping = nNumGrouping;
571  pGlobalData->nNumDigits = nNumDigits;
572  pGlobalData->nNumNegFormat = nNumNegFormat;
573  pGlobalData->nNumLeadingZero = nNumLeadingZero;
574  pGlobalData->nNumMeasure = nNumMeasure;
575 
576  return TRUE;
577 }
578 
579 /* Property page dialog callback */
582  UINT uMsg,
583  WPARAM wParam,
584  LPARAM lParam)
585 {
586  PGLOBALDATA pGlobalData;
587 
588  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
589 
590  switch (uMsg)
591  {
592  case WM_INITDIALOG:
593  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
594  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
595 
596  InitNumDecimalSepCB(hwndDlg, pGlobalData);
597  InitNumOfFracSymbCB(hwndDlg, pGlobalData);
598  InitNumFieldSepCB(hwndDlg, pGlobalData);
599  InitFieldDigNumCB(hwndDlg, pGlobalData);
600  InitNegSignCB(hwndDlg, pGlobalData);
601  InitNegNumFmtCB(hwndDlg, pGlobalData);
602  InitLeadingZeroesCB(hwndDlg, pGlobalData);
603  InitListSepCB(hwndDlg, pGlobalData);
604  InitUnitsSysCB(hwndDlg, pGlobalData);
605  UpdateNumSamples(hwndDlg, pGlobalData);
606  break;
607 
608  case WM_COMMAND:
609  switch (LOWORD(wParam))
610  {
611  case IDC_NUMBERDSYMBOL:
612  case IDC_NUMBERSNDIGDEC:
615  case IDC_NUMBERSNSIGNSYM:
618  case IDC_NUMBERSLSEP:
619  case IDC_NUMBERSMEASSYS:
621  {
622  /* Enable the Apply button */
623  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
624  }
625  }
626  break;
627 
628  case WM_NOTIFY:
629  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
630  {
631  if (GetNumberSetting(hwndDlg, pGlobalData))
632  {
633  pGlobalData->bUserLocaleChanged = TRUE;
634  UpdateNumSamples(hwndDlg, pGlobalData);
635  }
636  }
637  break;
638  }
639  return FALSE;
640 }
641 
642 /* EOF */
static VOID InitNumOfFracSymbCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:107
static VOID InitNumDecimalSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:59
struct _GLOBALDATA * PGLOBALDATA
PWSTR ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl)
Definition: misc.c:118
static VOID InitNegNumFmtCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:268
VOID GetSelectedComboBoxText(HWND hwndDlg, INT nIdDlgItem, PWSTR Buffer, UINT uSize)
Definition: misc.c:176
static PWSTR lpNegNumFmtSamples[MAX_NEG_NUMBERS_SAMPLES]
Definition: numbers.c:49
static VOID InitListSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:350
VOID GetSelectedComboBoxIndex(HWND hwndDlg, INT nIdDlgItem, PINT pValue)
Definition: misc.c:223
static PWSTR lpFieldDigNumSamples[MAX_FIELD_DIG_SAMPLES]
Definition: numbers.c:45
#define MAX_NUMNEGATIVESIGN
Definition: intl.h:28
#define IDC_NUMBERSNDIGDEC
Definition: resource.h:37
uint16_t * PWSTR
Definition: typedefs.h:54
#define IDC_NUMBERSDGROUPING
Definition: resource.h:39
static BOOL GetNumberSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:474
#define CALLBACK
Definition: compat.h:27
#define TRUE
Definition: numbers.c:17
#define IDC_NUMBERSNSIGNSYM
Definition: resource.h:40
#define MAX_NUMDECIMALSEP
Definition: intl.h:26
#define MAX_NUM_SEP_SAMPLES
Definition: numbers.c:31
HINSTANCE hApplet
Definition: access.c:17
INT nNumNegFormat
Definition: intl.h:73
UINT_PTR WPARAM
Definition: windef.h:207
#define IDC_NUMBERSLSEP
Definition: resource.h:43
WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN]
Definition: intl.h:71
#define SendDlgItemMessage
Definition: winuser.h:5743
_CRTIMP wchar_t *__cdecl _itow(_In_ int _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
#define PSN_APPLY
Definition: prsht.h:117
static PWSTR lpListSepSamples[MAX_LIST_SEP_SAMPLES]
Definition: numbers.c:53
int32_t INT_PTR
Definition: typedefs.h:62
PWSTR InsSpacesFmt(PCWSTR szSourceStr, PCWSTR szFmtStr)
Definition: misc.c:39
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define MAX_NUMTHOUSANDSEP
Definition: intl.h:27
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
static VOID InitNumFieldSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:139
WPARAM wParam
Definition: combotst.c:138
WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP]
Definition: intl.h:70
static PWSTR lpNumSepSamples[MAX_NUM_SEP_SAMPLES]
Definition: numbers.c:41
#define IDS_METRIC
Definition: resource.h:77
unsigned int BOOL
Definition: ntddk_ex.h:94
static VOID UpdateNumSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:431
#define MAX_FRAC_NUM_SAMPLES
Definition: numbers.c:32
#define CB_ADDSTRING
Definition: winuser.h:1918
#define LPPROPSHEETPAGE
Definition: prsht.h:372
INT nNumLeadingZero
Definition: intl.h:75
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define IDC_NUMBERSNEGSAMPLE
Definition: resource.h:35
#define CB_LIMITTEXT
Definition: winuser.h:1940
#define MAX_LIST_SEP_SAMPLES
Definition: numbers.c:38
#define MAX_UNITS_SYS_SAMPLES
Definition: numbers.c:39
#define WM_SETTEXT
Definition: winuser.h:1599
#define CB_RESETCONTENT
Definition: winuser.h:1941
#define CB_ERR
Definition: winuser.h:2410
#define MAX_SAMPLES_STR_SIZE
Definition: intl.h:24
UINT LeadingZero
Definition: winnls.h:632
#define GetProcessHeap()
Definition: compat.h:395
#define CBN_EDITCHANGE
Definition: winuser.h:1957
INT nNumGrouping
Definition: intl.h:76
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR szNumListSep[MAX_NUMLISTSEP]
Definition: intl.h:72
#define PropSheet_Changed(d, w)
Definition: prsht.h:326
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_NUMBERSNNUMFORMAT
Definition: resource.h:41
#define IDC_NUMBERSDIGITGRSYM
Definition: resource.h:38
WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP]
Definition: intl.h:69
GROUPINGDATA GroupingFormats[MAX_GROUPINGFORMATS]
Definition: generalp.c:44
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
#define DWLP_USER
Definition: winuser.h:866
#define CB_SELECTSTRING
Definition: winuser.h:1942
#define MAX_LEAD_ZEROES_SAMPLES
Definition: numbers.c:37
INT nNumMeasure
Definition: intl.h:77
#define MAX_FIELD_SEP_SAMPLES
Definition: numbers.c:33
INT nNumDigits
Definition: intl.h:74
#define CB_SETCURSEL
Definition: winuser.h:1943
#define DECIMAL_RADIX
Definition: intl.h:19
#define WM_COMMAND
Definition: winuser.h:1722
#define MAX_FMT_SIZE
Definition: intl.h:22
UINT NumDigits
Definition: winnls.h:631
static VOID InitUnitsSysCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:399
static PWSTR lpNegSignSamples[MAX_NEG_SIGN_SAMPLES]
Definition: numbers.c:47
#define MAX_NEG_NUMBERS_SAMPLES
Definition: numbers.c:36
#define SAMPLE_NEG_NUMBER
Definition: numbers.c:30
HWND WINAPI GetParent(_In_ HWND)
#define SAMPLE_NUMBER
Definition: numbers.c:29
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define MAX_NEG_SIGN_SAMPLES
Definition: numbers.c:35
#define CBN_SELCHANGE
Definition: winuser.h:1961
LPSTR lpThousandSep
Definition: winnls.h:635
#define IDC_NUMBERSDISPLEADZER
Definition: resource.h:42
#define IDC_NUMBERDSYMBOL
Definition: resource.h:36
static VOID InitFieldDigNumCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:187
static VOID InitNegSignCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:220
static PWSTR lpFieldSepSamples[MAX_FIELD_SEP_SAMPLES]
Definition: numbers.c:43
#define HIWORD(l)
Definition: typedefs.h:246
LPSTR lpDecimalSep
Definition: winnls.h:634
#define IDC_NUMBERSPOSSAMPLE
Definition: resource.h:34
static VOID InitLeadingZeroesCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:315
#define GetWindowLongPtr
Definition: treelist.c:73
INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags, LPCWSTR lpszValue, const NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchOut)
Definition: lcformat.c:1198
#define MAX_FIELD_DIG_SAMPLES
Definition: numbers.c:34
UINT nInteger
Definition: intl.h:127
#define MAX_NUMLISTSEP
Definition: intl.h:30
UINT Grouping
Definition: winnls.h:633
UINT NegativeOrder
Definition: winnls.h:636
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HeapFree(x, y, z)
Definition: compat.h:394
#define IDC_NUMBERSMEASSYS
Definition: resource.h:44
#define WM_NOTIFY
Definition: richedit.h:61
static PWSTR lpLeadNumFmtSamples[MAX_LEAD_ZEROES_SAMPLES]
Definition: numbers.c:51
INT_PTR CALLBACK NumbersPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: numbers.c:581
LCID UserLCID
Definition: intl.h:113