31#define YEAR_STR_MAX_SIZE 5
32#define MAX_SHRT_DATE_SEPARATORS 3
33#define STD_DATE_SEP L"."
35#define MAX_YEAR (9999)
56 UINT nDateCompCount=0;
60 if (pszFoundSep ==
NULL)
65 while (nDateCompCount <
wcslen(szSourceStr))
67 if (!
isDateCompAl(szSourceStr[nDateCompCount]) && (szSourceStr[nDateCompCount] !=
L'\''))
69 while (!
isDateCompAl(szSourceStr[nDateCompCount]) && (szSourceStr[nDateCompCount] !=
L'\''))
71 pszFoundSep[nDateSepCount++] = szSourceStr[nDateCompCount];
75 pszFoundSep[nDateSepCount] =
L'\0';
102 nSepStrSize =
wcslen(pszShortDateSep);
105 for (nSepCount = 0; nSepCount < nSepStrSize; nSepCount++)
107 if (
iswalnum(pszShortDateSep[nSepCount]) || (pszShortDateSep[nSepCount] ==
L'\''))
114 if (nSepStrSize == 0)
148 nFmtStrSize =
wcslen(pszShortDateFmt);
151 for (nDateCompCount = 0; nDateCompCount < nFmtStrSize; nDateCompCount++)
153 if (pszShortDateFmt[nDateCompCount] ==
L'\'')
155 OpenApostFlg = !OpenApostFlg;
158 if (
iswalnum(pszShortDateFmt[nDateCompCount]) &&
167 if (OpenApostFlg || nFmtStrSize == 0)
174 if (pszFoundSep !=
NULL)
177 wcscpy(szFoundDateSep, pszFoundSep);
178 pszResultStr =
ReplaceSubStr(pszShortDateFmt, szShortDateSep, szFoundDateSep);
179 if (pszResultStr !=
NULL)
181 wcscpy(pszShortDateFmt, pszResultStr);
206 nFmtStrSize =
wcslen(pszLongDateFmt);
209 for (nDateCompCount = 0; nDateCompCount < nFmtStrSize; nDateCompCount++)
211 if (pszLongDateFmt[nDateCompCount] ==
L'\'')
213 OpenApostFlg = !OpenApostFlg;
216 if (
iswalnum(pszLongDateFmt[nDateCompCount]) &&
225 if (OpenApostFlg || nFmtStrSize == 0)
259 (
LPARAM)ShortDateSepSamples[nCBIndex]);
288 (
LPARAM)lpTimeFormatString);
415 CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
565 pGlobalData->bEnableYearNotification =
TRUE;
573 pGlobalData !=
NULL &&
574 pGlobalData->bEnableYearNotification ==
TRUE)
603 pGlobalData->bUserLocaleChanged =
TRUE;
static VOID UpdateDateLocaleSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
static VOID SetMinDate(HWND hwndDlg)
LPTSTR FindDateSep(const WCHAR *szSourceStr)
static VOID InitShortDateSepSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
INT_PTR CALLBACK DatePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT GetMaxDate(LCID lcid)
#define YEAR_STR_MAX_SIZE
static VOID InitMinMaxDateSpin(HWND hwndDlg, PGLOBALDATA pGlobalData)
BOOL isDateCompAl(WCHAR alpha)
static BOOL GetDateSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
static BOOL CALLBACK ShortDateFormatEnumProc(PWSTR lpTimeFormatString)
static BOOL SetShortDateFormat(HWND hwndDlg, PWSTR pszShortDateFmt)
static VOID SetMaxDate(HWND hwndDlg, LCID lcid)
static VOID InitLongDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
static BOOL SetLongDateFormat(HWND hwndDlg, PWSTR pszLongDateFmt)
VOID InitShortDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
static BOOL SetShortDateSep(HWND hwndDlg, PWSTR pszShortDateSep)
#define MAX_SHRT_DATE_SEPARATORS
#define IDC_LONGDATESAMPLE_EDIT
#define IDC_SECONDYEAR_EDIT
#define IDC_SHRTDATESEP_COMBO
#define IDC_HIJCHRON_COMBO
#define IDC_LONGDATEFMT_COMBO
#define IDS_ERROR_SYMBOL_FORMAT_LONG
#define IDC_SHRTDATESAMPLE_EDIT
#define IDC_CALTYPE_COMBO
#define IDC_SHRTDATEFMT_COMBO
#define IDC_FIRSTYEAR_EDIT
#define IDS_ERROR_SYMBOL_SEPARATE
#define IDS_ERROR_SYMBOL_FORMAT_SHORT
#define HeapFree(x, y, z)
GLclampf GLclampf GLclampf alpha
_CRTIMP wchar_t *__cdecl _itow(_In_ int _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
VOID PrintErrorMsgBox(UINT msg)
PWSTR ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl)
#define MAX_LONGDATEFORMAT
struct _GLOBALDATA * PGLOBALDATA
#define MAX_SHORTDATEFORMAT
#define MAX_DATESEPARATOR
#define MAX_SAMPLES_STR_SIZE
#define PropSheet_Changed(d, w)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
WCHAR szShortDateFormat[MAX_SHORTDATEFORMAT]
WCHAR szLongDateFormat[MAX_LONGDATEFORMAT]
WCHAR szDateSep[MAX_DATESEPARATOR]
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)