Author: ekohl
Date: Sun Oct 11 15:21:25 2015
New Revision: 69497
URL:
http://svn.reactos.org/svn/reactos?rev=69497&view=rev
Log:
[INTL]
Update date and time examples according to the current settings.
CORE-10074
Modified:
trunk/reactos/dll/cpl/intl/date.c
trunk/reactos/dll/cpl/intl/generalp.c
trunk/reactos/dll/cpl/intl/time.c
Modified: trunk/reactos/dll/cpl/intl/date.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/date.c?rev=69…
==============================================================================
--- trunk/reactos/dll/cpl/intl/date.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/date.c [iso-8859-1] Sun Oct 11 15:21:25 2015
@@ -503,13 +503,15 @@
WCHAR OutBuffer[MAX_SAMPLES_STR_SIZE];
/* Get short date format sample */
- GetDateFormatW(pGlobalData->UserLCID, DATE_SHORTDATE, NULL, NULL, OutBuffer,
+ GetDateFormatW(pGlobalData->UserLCID, 0, NULL,
+ pGlobalData->szShortDateFormat, OutBuffer,
MAX_SAMPLES_STR_SIZE);
SendDlgItemMessageW(hwndDlg, IDC_SHRTDATESAMPLE_EDIT, WM_SETTEXT,
0, (LPARAM)OutBuffer);
/* Get long date sample */
- GetDateFormatW(pGlobalData->UserLCID, DATE_LONGDATE, NULL, NULL, OutBuffer,
+ GetDateFormatW(pGlobalData->UserLCID, 0, NULL,
+ pGlobalData->szLongDateFormat, OutBuffer,
MAX_SAMPLES_STR_SIZE);
SendDlgItemMessageW(hwndDlg, IDC_LONGDATESAMPLE_EDIT,
WM_SETTEXT, 0, (LPARAM)OutBuffer);
Modified: trunk/reactos/dll/cpl/intl/generalp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/generalp.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/intl/generalp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/generalp.c [iso-8859-1] Sun Oct 11 15:21:25 2015
@@ -127,20 +127,23 @@
ZeroMemory(OutBuffer, MAX_SAMPLES_STR_SIZE * sizeof(WCHAR));
/* Get time format sample */
- GetTimeFormatW(pGlobalData->UserLCID, NO_FLAG, NULL, NULL,
+ GetTimeFormatW(pGlobalData->UserLCID, 0, NULL,
+ pGlobalData->szTimeFormat,
OutBuffer, MAX_SAMPLES_STR_SIZE);
SendDlgItemMessageW(hwndDlg, IDC_TIMESAMPLE_EDIT,
WM_SETTEXT, 0, (LPARAM)OutBuffer);
ZeroMemory(OutBuffer, MAX_SAMPLES_STR_SIZE * sizeof(WCHAR));
/* Get short date format sample */
- GetDateFormatW(pGlobalData->UserLCID, DATE_SHORTDATE, NULL, NULL,
+ GetDateFormatW(pGlobalData->UserLCID, 0, NULL,
+ pGlobalData->szShortDateFormat,
OutBuffer, MAX_SAMPLES_STR_SIZE);
SendDlgItemMessageW(hwndDlg, IDC_SHORTTIMESAMPLE_EDIT,
WM_SETTEXT, 0, (LPARAM)OutBuffer);
/* Get long date sample */
- GetDateFormatW(pGlobalData->UserLCID, DATE_LONGDATE, NULL, NULL,
+ GetDateFormatW(pGlobalData->UserLCID, 0, NULL,
+ pGlobalData->szLongDateFormat,
OutBuffer, MAX_SAMPLES_STR_SIZE);
SendDlgItemMessageW(hwndDlg, IDC_FULLTIMESAMPLE_EDIT,
WM_SETTEXT, 0, (LPARAM)OutBuffer);
Modified: trunk/reactos/dll/cpl/intl/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/time.c?rev=69…
==============================================================================
--- trunk/reactos/dll/cpl/intl/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/time.c [iso-8859-1] Sun Oct 11 15:21:25 2015
@@ -41,9 +41,11 @@
static VOID
UpdateTimeSample(HWND hWnd, PGLOBALDATA pGlobalData)
{
- WCHAR szBuffer[80];
-
- GetTimeFormatW(pGlobalData->UserLCID, 0, NULL, pGlobalData->szTimeFormat,
szBuffer, 80);
+ WCHAR szBuffer[MAX_SAMPLES_STR_SIZE];
+
+ GetTimeFormatW(pGlobalData->UserLCID, 0, NULL,
+ pGlobalData->szTimeFormat, szBuffer,
+ MAX_SAMPLES_STR_SIZE);
SendDlgItemMessageW(hWnd, IDC_TIMESAMPLE, WM_SETTEXT, 0, (LPARAM)szBuffer);
}