Go to the source code of this file.
|
BOOL | isDateCompAl (WCHAR alpha) |
|
LPTSTR | FindDateSep (const WCHAR *szSourceStr) |
|
static BOOL | SetShortDateSep (HWND hwndDlg, PWSTR pszShortDateSep) |
|
static BOOL | SetShortDateFormat (HWND hwndDlg, PWSTR pszShortDateFmt) |
|
static BOOL | SetLongDateFormat (HWND hwndDlg, PWSTR pszLongDateFmt) |
|
static VOID | InitShortDateSepSamples (HWND hwndDlg, PGLOBALDATA pGlobalData) |
|
static BOOL CALLBACK | ShortDateFormatEnumProc (PWSTR lpTimeFormatString) |
|
VOID | InitShortDateCB (HWND hwndDlg, PGLOBALDATA pGlobalData) |
|
static VOID | InitLongDateCB (HWND hwndDlg, PGLOBALDATA pGlobalData) |
|
static VOID | SetMaxDate (HWND hwndDlg, LCID lcid) |
|
static INT | GetMaxDate (LCID lcid) |
|
static VOID | SetMinDate (HWND hwndDlg) |
|
static VOID | InitMinMaxDateSpin (HWND hwndDlg, PGLOBALDATA pGlobalData) |
|
static VOID | UpdateDateLocaleSamples (HWND hwndDlg, PGLOBALDATA pGlobalData) |
|
static BOOL | GetDateSetting (HWND hwndDlg, PGLOBALDATA pGlobalData) |
|
INT_PTR CALLBACK | DatePageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
|
◆ MAX_SHRT_DATE_SEPARATORS
#define MAX_SHRT_DATE_SEPARATORS 3 |
◆ MAX_YEAR
◆ STD_DATE_SEP
◆ YEAR_DIFF
◆ YEAR_STR_MAX_SIZE
◆ DatePageProc()
Definition at line 544 of file date.c.
548{
550
552
553 switch (uMsg)
554 {
558
564
566 break;
567
570 {
573 pGlobalData !=
NULL &&
575 {
577
578
580 }
581 break;
582
590 {
591
593 }
594 break;
595 }
596 break;
597
600 {
602 {
606 }
607 }
608 break;
609 }
610
612}
static VOID UpdateDateLocaleSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
static VOID SetMinDate(HWND hwndDlg)
static VOID InitShortDateSepSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
static VOID InitMinMaxDateSpin(HWND hwndDlg, PGLOBALDATA pGlobalData)
static BOOL GetDateSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
static VOID SetMaxDate(HWND hwndDlg, LCID lcid)
static VOID InitLongDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
VOID InitShortDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
#define IDC_SECONDYEAR_EDIT
#define IDC_SHRTDATESEP_COMBO
#define IDC_HIJCHRON_COMBO
#define IDC_LONGDATEFMT_COMBO
#define IDC_CALTYPE_COMBO
#define IDC_SHRTDATEFMT_COMBO
struct _GLOBALDATA * PGLOBALDATA
#define PropSheet_Changed(d, w)
BOOL bEnableYearNotification
HWND WINAPI GetParent(_In_ HWND)
Referenced by CustomizeLocalePropertySheet().
◆ FindDateSep()
Definition at line 53 of file date.c.
54{
56 UINT nDateCompCount=0;
58
60 if (pszFoundSep ==
NULL)
62
64
65 while (nDateCompCount <
wcslen(szSourceStr))
66 {
67 if (!
isDateCompAl(szSourceStr[nDateCompCount]) && (szSourceStr[nDateCompCount] !=
L'\''))
68 {
69 while (!
isDateCompAl(szSourceStr[nDateCompCount]) && (szSourceStr[nDateCompCount] !=
L'\''))
70 {
71 pszFoundSep[nDateSepCount++] = szSourceStr[nDateCompCount];
72 nDateCompCount++;
73 }
74
75 pszFoundSep[nDateSepCount] =
L'\0';
76 return pszFoundSep;
77 }
78
79 nDateCompCount++;
80 }
81
82 return pszFoundSep;
83}
BOOL isDateCompAl(WCHAR alpha)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define MAX_SAMPLES_STR_SIZE
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
Referenced by SetShortDateFormat().
◆ GetDateSetting()
Definition at line 519 of file date.c.
522{
526
530 {
532 }
533
534
538
540}
static BOOL SetShortDateFormat(HWND hwndDlg, PWSTR pszShortDateFmt)
static BOOL SetLongDateFormat(HWND hwndDlg, PWSTR pszLongDateFmt)
static BOOL SetShortDateSep(HWND hwndDlg, PWSTR pszShortDateSep)
#define MAX_LONGDATEFORMAT
#define MAX_SHORTDATEFORMAT
#define MAX_DATESEPARATOR
WCHAR szShortDateFormat[MAX_SHORTDATEFORMAT]
WCHAR szLongDateFormat[MAX_LONGDATEFORMAT]
WCHAR szDateSep[MAX_DATESEPARATOR]
Referenced by DatePageProc().
◆ GetMaxDate()
Definition at line 409 of file date.c.
410{
412
415 CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
417 0,
419
420 return nMaxDateVal;
421}
Referenced by InitMinMaxDateSpin().
◆ InitLongDateCB()
Definition at line 341 of file date.c.
342{
344
345
349 0);
350
351
356
357
360
361
364 -1,
366
367
369 {
372 0,
376 -1,
378 }
379}
static BOOL CALLBACK ShortDateFormatEnumProc(PWSTR lpTimeFormatString)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by DatePageProc().
◆ InitMinMaxDateSpin()
Definition at line 449 of file date.c.
450{
453
454
458 0);
462 0);
463
465
466
470 0,
472
473
477 0,
479
480
481
484 0,
486
487
490 0,
492}
static INT GetMaxDate(LCID lcid)
#define YEAR_STR_MAX_SIZE
#define IDC_FIRSTYEAR_EDIT
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by DatePageProc().
◆ InitShortDateCB()
Definition at line 295 of file date.c.
296{
298
299
303 0);
307 0);
308
309
314
315
318
319
322 -1,
324
325
327 {
330 0,
334 -1,
336 }
337}
Referenced by DatePageProc().
◆ InitShortDateSepSamples()
Definition at line 236 of file date.c.
237{
239 {
243 };
246
247
252
253
255 {
258 0,
259 (
LPARAM)ShortDateSepSamples[nCBIndex]);
260 }
261
262
265 -1,
267
268
270 {
273 0,
277 -1,
279 }
280}
#define MAX_SHRT_DATE_SEPARATORS
Referenced by DatePageProc().
◆ isDateCompAl()
◆ SetLongDateFormat()
static BOOL SetLongDateFormat |
( |
HWND |
hwndDlg, |
|
|
PWSTR |
pszLongDateFmt |
|
) |
| |
|
static |
Definition at line 193 of file date.c.
194{
198
199
204
205
206 nFmtStrSize =
wcslen(pszLongDateFmt);
207
208
209 for (nDateCompCount = 0; nDateCompCount < nFmtStrSize; nDateCompCount++)
210 {
211 if (pszLongDateFmt[nDateCompCount] ==
L'\'')
212 {
213 OpenApostFlg = !OpenApostFlg;
214 }
215
216 if (
iswalnum(pszLongDateFmt[nDateCompCount]) &&
218 !OpenApostFlg)
219 {
222 }
223 }
224
225 if (OpenApostFlg || nFmtStrSize == 0)
226 {
229 }
230
232}
#define IDS_ERROR_SYMBOL_FORMAT_LONG
VOID PrintErrorMsgBox(UINT msg)
Referenced by GetDateSetting().
◆ SetMaxDate()
Definition at line 383 of file date.c.
384{
388
390
391
394 0,
395 0));
396
397
399
400
403 48 ,
405}
_CRTIMP wchar_t *__cdecl _itow(_In_ int _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
Referenced by DatePageProc().
◆ SetMinDate()
Definition at line 425 of file date.c.
426{
430
432
433
436 0,
437 0));
438
439
443 0,
445}
Referenced by DatePageProc().
◆ SetShortDateFormat()
static BOOL SetShortDateFormat |
( |
HWND |
hwndDlg, |
|
|
PWSTR |
pszShortDateFmt |
|
) |
| |
|
static |
Definition at line 125 of file date.c.
126{
134
135
140
141
146
147
148 nFmtStrSize =
wcslen(pszShortDateFmt);
149
150
151 for (nDateCompCount = 0; nDateCompCount < nFmtStrSize; nDateCompCount++)
152 {
153 if (pszShortDateFmt[nDateCompCount] ==
L'\'')
154 {
155 OpenApostFlg = !OpenApostFlg;
156 }
157
158 if (
iswalnum(pszShortDateFmt[nDateCompCount]) &&
160 !OpenApostFlg)
161 {
164 }
165 }
166
167 if (OpenApostFlg || nFmtStrSize == 0)
168 {
171 }
172
174 if (pszFoundSep !=
NULL)
175 {
176
177 wcscpy(szFoundDateSep, pszFoundSep);
178 pszResultStr =
ReplaceSubStr(pszShortDateFmt, szShortDateSep, szFoundDateSep);
179 if (pszResultStr !=
NULL)
180 {
181 wcscpy(pszShortDateFmt, pszResultStr);
183 }
184
186 }
187
189}
LPTSTR FindDateSep(const WCHAR *szSourceStr)
#define IDS_ERROR_SYMBOL_FORMAT_SHORT
#define HeapFree(x, y, z)
PWSTR ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl)
Referenced by GetDateSetting().
◆ SetShortDateSep()
static BOOL SetShortDateSep |
( |
HWND |
hwndDlg, |
|
|
PWSTR |
pszShortDateSep |
|
) |
| |
|
static |
Definition at line 90 of file date.c.
91{
94
95
100
101
102 nSepStrSize =
wcslen(pszShortDateSep);
103
104
105 for (nSepCount = 0; nSepCount < nSepStrSize; nSepCount++)
106 {
107 if (
iswalnum(pszShortDateSep[nSepCount]) || (pszShortDateSep[nSepCount] ==
L'\''))
108 {
111 }
112 }
113
114 if (nSepStrSize == 0)
115 {
118 }
119
121}
#define IDS_ERROR_SYMBOL_SEPARATE
Referenced by GetDateSetting().
◆ ShortDateFormatEnumProc()
◆ UpdateDateLocaleSamples()
Definition at line 496 of file date.c.
498{
500
501
507
508
514}
#define IDC_LONGDATESAMPLE_EDIT
#define IDC_SHRTDATESAMPLE_EDIT
Referenced by DatePageProc().
◆ hwndEnum