mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
[INTL]
- Get rid of the individual getter funtions. Use GetSelectedComboBoxIndex for all CBS_DROPDOWNLIST comboboxes and GetSelectedComboBoxText for all CBS_DROPDOWN comboboxes. - Check the relevant settings only! - Rename SetXxxSettings to GetXxxSettings because it is a getter function. - Handle the bogus WM_COMMAND/EN_CHANGE message that is sent when the IDC_SECONDYEAR_EDIT edit control is initialized. Controls should NEVER send notifications when they are modified programmatically! :-/ svn path=/trunk/; revision=74488
This commit is contained in:
parent
3ac350cfe0
commit
d4b437e4ee
6 changed files with 296 additions and 388 deletions
|
@ -261,145 +261,80 @@ InitDigitGroupCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set number of digits in field */
|
static
|
||||||
static BOOL
|
BOOL
|
||||||
SetCurrencyDigNum(HWND hwndDlg, PINT pnCurrGrouping)
|
GetCurrencySetting(
|
||||||
{
|
HWND hwndDlg,
|
||||||
INT nCurrSel;
|
PGLOBALDATA pGlobalData)
|
||||||
|
|
||||||
/* Get setted number of digits in field */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_CURRENCYGRPNUM,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnCurrGrouping = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set currency field separator */
|
|
||||||
static BOOL
|
|
||||||
SetCurrencyFieldSep(HWND hwndDlg, PWSTR pszCurrThousandSep)
|
|
||||||
{
|
|
||||||
/* Get setted currency field separator */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_CURRENCYGRPSEP,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_CURRTHOUSANDSEP,
|
|
||||||
(LPARAM)pszCurrThousandSep);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set number of fractional symbols */
|
|
||||||
static BOOL
|
|
||||||
SetCurrencyFracSymNum(HWND hwndDlg, PINT pnCurrDigits)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted number of fractional symbols */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_CURRENCYDECNUM,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnCurrDigits = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set currency separator */
|
|
||||||
static BOOL
|
|
||||||
SetCurrencySep(HWND hwndDlg, PWSTR pszCurrDecimalSep)
|
|
||||||
{
|
|
||||||
/* Get setted currency decimal separator */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_CURRENCYDECSEP,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_CURRDECIMALSEP,
|
|
||||||
(LPARAM)pszCurrDecimalSep);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set negative currency sum format */
|
|
||||||
static BOOL
|
|
||||||
SetNegCurrencySumFmt(HWND hwndDlg, PINT pnCurrNegFormat)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted currency unit */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_CURRENCYNEGVALUE,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnCurrNegFormat = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set positive currency sum format */
|
|
||||||
static BOOL
|
|
||||||
SetPosCurrencySumFmt(HWND hwndDlg, PINT pnCurrPosFormat)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted currency unit */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_CURRENCYPOSVALUE,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnCurrPosFormat = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set currency symbol */
|
|
||||||
static BOOL
|
|
||||||
SetCurrencySymbol(HWND hwndDlg, PWSTR pszCurrSymbol)
|
|
||||||
{
|
|
||||||
/* Get setted currency unit */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_CURRENCYSYMBOL,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_CURRSYMBOL,
|
|
||||||
(LPARAM)pszCurrSymbol);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL
|
|
||||||
SetCurrencySetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
|
|
||||||
{
|
{
|
||||||
WCHAR szCurrSymbol[MAX_CURRSYMBOL];
|
WCHAR szCurrSymbol[MAX_CURRSYMBOL];
|
||||||
WCHAR szCurrDecimalSep[MAX_CURRDECIMALSEP];
|
WCHAR szCurrDecimalSep[MAX_CURRDECIMALSEP];
|
||||||
WCHAR szCurrThousandSep[MAX_CURRTHOUSANDSEP];
|
WCHAR szCurrThousandSep[MAX_CURRTHOUSANDSEP];
|
||||||
INT nCurrGrouping;
|
|
||||||
INT nCurrPosFormat;
|
INT nCurrPosFormat;
|
||||||
INT nCurrNegFormat;
|
INT nCurrNegFormat;
|
||||||
INT nCurrDigits;
|
INT nCurrDigits;
|
||||||
|
INT nCurrGrouping;
|
||||||
|
|
||||||
if (!SetCurrencySymbol(hwndDlg, szCurrSymbol) ||
|
/* Currency symbol */
|
||||||
!SetCurrencyDigNum(hwndDlg, &nCurrGrouping) ||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
!SetPosCurrencySumFmt(hwndDlg, &nCurrPosFormat) ||
|
IDC_CURRENCYSYMBOL,
|
||||||
!SetNegCurrencySumFmt(hwndDlg, &nCurrNegFormat) ||
|
szCurrSymbol,
|
||||||
!SetCurrencySep(hwndDlg, szCurrDecimalSep) ||
|
MAX_SAMPLES_STR_SIZE);
|
||||||
!SetCurrencyFracSymNum(hwndDlg, &nCurrDigits) ||
|
|
||||||
!SetCurrencyFieldSep(hwndDlg, szCurrThousandSep))
|
if (szCurrSymbol[0] == L'\0')
|
||||||
{
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* store to global data */
|
/* Positive Amount */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_CURRENCYPOSVALUE,
|
||||||
|
&nCurrPosFormat);
|
||||||
|
|
||||||
|
/* Negative Amount */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_CURRENCYNEGVALUE,
|
||||||
|
&nCurrNegFormat);
|
||||||
|
|
||||||
|
/* Decimal separator */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_CURRENCYDECSEP,
|
||||||
|
szCurrDecimalSep,
|
||||||
|
MAX_SAMPLES_STR_SIZE);
|
||||||
|
|
||||||
|
if (szCurrDecimalSep[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Number of fractional digits */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_CURRENCYDECNUM,
|
||||||
|
&nCurrDigits);
|
||||||
|
|
||||||
|
/* Grouping symbol */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_CURRENCYGRPSEP,
|
||||||
|
szCurrThousandSep,
|
||||||
|
MAX_SAMPLES_STR_SIZE);
|
||||||
|
|
||||||
|
if (szCurrThousandSep[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Digit grouping */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_CURRENCYGRPNUM,
|
||||||
|
&nCurrGrouping);
|
||||||
|
|
||||||
|
/* Store settings in global data */
|
||||||
wcscpy(pGlobalData->szCurrSymbol, szCurrSymbol);
|
wcscpy(pGlobalData->szCurrSymbol, szCurrSymbol);
|
||||||
pGlobalData->nCurrGrouping = nCurrGrouping;
|
pGlobalData->nCurrGrouping = nCurrGrouping;
|
||||||
wcscpy(pGlobalData->szCurrDecimalSep, szCurrDecimalSep);
|
wcscpy(pGlobalData->szCurrDecimalSep, szCurrDecimalSep);
|
||||||
|
@ -448,7 +383,8 @@ CurrencyPageProc(HWND hwndDlg,
|
||||||
case IDC_CURRENCYDECNUM:
|
case IDC_CURRENCYDECNUM:
|
||||||
case IDC_CURRENCYGRPSEP:
|
case IDC_CURRENCYGRPSEP:
|
||||||
case IDC_CURRENCYGRPNUM:
|
case IDC_CURRENCYGRPNUM:
|
||||||
if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE)
|
if (HIWORD(wParam) == CBN_SELCHANGE ||
|
||||||
|
HIWORD(wParam) == CBN_EDITCHANGE)
|
||||||
{
|
{
|
||||||
/* Enable the Apply button */
|
/* Enable the Apply button */
|
||||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||||
|
@ -459,7 +395,7 @@ CurrencyPageProc(HWND hwndDlg,
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
||||||
{
|
{
|
||||||
if (SetCurrencySetting(hwndDlg, pGlobalData))
|
if (GetCurrencySetting(hwndDlg, pGlobalData))
|
||||||
{
|
{
|
||||||
pGlobalData->bUserLocaleChanged = TRUE;
|
pGlobalData->bUserLocaleChanged = TRUE;
|
||||||
UpdateExamples(hwndDlg, pGlobalData);
|
UpdateExamples(hwndDlg, pGlobalData);
|
||||||
|
|
|
@ -162,7 +162,6 @@ SetShortDateFormat(HWND hwndDlg, PWSTR pszShortDateFmt)
|
||||||
PrintErrorMsgBox(IDS_ERROR_SYMBOL_FORMAT_SHORT);
|
PrintErrorMsgBox(IDS_ERROR_SYMBOL_FORMAT_SHORT);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OpenApostFlg || nFmtStrSize == 0)
|
if (OpenApostFlg || nFmtStrSize == 0)
|
||||||
|
@ -221,7 +220,6 @@ SetLongDateFormat(HWND hwndDlg, PWSTR pszLongDateFmt)
|
||||||
PrintErrorMsgBox(IDS_ERROR_SYMBOL_FORMAT_LONG);
|
PrintErrorMsgBox(IDS_ERROR_SYMBOL_FORMAT_LONG);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OpenApostFlg || nFmtStrSize == 0)
|
if (OpenApostFlg || nFmtStrSize == 0)
|
||||||
|
@ -515,24 +513,28 @@ UpdateDateLocaleSamples(HWND hwndDlg,
|
||||||
WM_SETTEXT, 0, (LPARAM)OutBuffer);
|
WM_SETTEXT, 0, (LPARAM)OutBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
|
||||||
SetDateSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
|
|
||||||
{
|
|
||||||
WCHAR szLongDateFmt[MAX_SAMPLES_STR_SIZE];
|
|
||||||
WCHAR szShortDateFmt[MAX_SAMPLES_STR_SIZE];
|
|
||||||
WCHAR szShortDateSep[MAX_SAMPLES_STR_SIZE];
|
|
||||||
|
|
||||||
if (!SetLongDateFormat(hwndDlg, szLongDateFmt) ||
|
static
|
||||||
!SetShortDateFormat(hwndDlg, szShortDateFmt) ||
|
BOOL
|
||||||
!SetShortDateSep(hwndDlg, szShortDateSep))
|
GetDateSetting(
|
||||||
|
HWND hwndDlg,
|
||||||
|
PGLOBALDATA pGlobalData)
|
||||||
|
{
|
||||||
|
WCHAR szLongDateFormat[MAX_SAMPLES_STR_SIZE];
|
||||||
|
WCHAR szShortDateFormat[MAX_SAMPLES_STR_SIZE];
|
||||||
|
WCHAR szDateSeparator[MAX_SAMPLES_STR_SIZE];
|
||||||
|
|
||||||
|
if (!SetLongDateFormat(hwndDlg, szLongDateFormat) ||
|
||||||
|
!SetShortDateFormat(hwndDlg, szShortDateFormat) ||
|
||||||
|
!SetShortDateSep(hwndDlg, szDateSeparator))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* store to global data */
|
/* Store settings in global data */
|
||||||
wcscpy(pGlobalData->szLongDateFormat, szLongDateFmt);
|
wcscpy(pGlobalData->szLongDateFormat, szLongDateFormat);
|
||||||
wcscpy(pGlobalData->szShortDateFormat, szShortDateFmt);
|
wcscpy(pGlobalData->szShortDateFormat, szShortDateFormat);
|
||||||
wcscpy(pGlobalData->szDateSep, szShortDateSep);
|
wcscpy(pGlobalData->szDateSep, szDateSeparator);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -560,22 +562,22 @@ DatePageProc(HWND hwndDlg,
|
||||||
InitLongDateCB(hwndDlg, pGlobalData);
|
InitLongDateCB(hwndDlg, pGlobalData);
|
||||||
InitShortDateSepSamples(hwndDlg, pGlobalData);
|
InitShortDateSepSamples(hwndDlg, pGlobalData);
|
||||||
/* TODO: Add other calendar types */
|
/* TODO: Add other calendar types */
|
||||||
|
pGlobalData->bEnableYearNotification = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_SECONDYEAR_EDIT:
|
case IDC_SECONDYEAR_EDIT:
|
||||||
if (HIWORD(wParam) == EN_CHANGE)
|
if (HIWORD(wParam) == EN_CHANGE &&
|
||||||
|
pGlobalData != NULL &&
|
||||||
|
pGlobalData->bEnableYearNotification == TRUE)
|
||||||
{
|
{
|
||||||
SetMinDate(hwndDlg);
|
SetMinDate(hwndDlg);
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IDC_SCR_MAX_YEAR:
|
/* Enable the Apply button */
|
||||||
/* Set "Apply" button enabled */
|
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||||
/* FIXME */
|
}
|
||||||
//PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDC_CALTYPE_COMBO:
|
case IDC_CALTYPE_COMBO:
|
||||||
|
@ -583,7 +585,8 @@ DatePageProc(HWND hwndDlg,
|
||||||
case IDC_SHRTDATEFMT_COMBO:
|
case IDC_SHRTDATEFMT_COMBO:
|
||||||
case IDC_LONGDATEFMT_COMBO:
|
case IDC_LONGDATEFMT_COMBO:
|
||||||
case IDC_SHRTDATESEP_COMBO:
|
case IDC_SHRTDATESEP_COMBO:
|
||||||
if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE)
|
if (HIWORD(wParam) == CBN_SELCHANGE ||
|
||||||
|
HIWORD(wParam) == CBN_EDITCHANGE)
|
||||||
{
|
{
|
||||||
/* Enable the Apply button */
|
/* Enable the Apply button */
|
||||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||||
|
@ -595,7 +598,7 @@ DatePageProc(HWND hwndDlg,
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
||||||
{
|
{
|
||||||
if (SetDateSetting(hwndDlg, pGlobalData))
|
if (GetDateSetting(hwndDlg, pGlobalData))
|
||||||
{
|
{
|
||||||
pGlobalData->bUserLocaleChanged = TRUE;
|
pGlobalData->bUserLocaleChanged = TRUE;
|
||||||
SetMaxDate(hwndDlg, pGlobalData->UserLCID);
|
SetMaxDate(hwndDlg, pGlobalData->UserLCID);
|
||||||
|
|
|
@ -61,13 +61,15 @@ typedef struct _APPLET
|
||||||
|
|
||||||
typedef struct _GLOBALDATA
|
typedef struct _GLOBALDATA
|
||||||
{
|
{
|
||||||
|
/* General */
|
||||||
|
WCHAR szNumPositiveSign[MAX_NUMPOSITIVESIGN];
|
||||||
|
WCHAR szNumNativeDigits[MAX_NUMNATIVEDIGITS];
|
||||||
|
|
||||||
/* Number */
|
/* Number */
|
||||||
WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP];
|
WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP];
|
||||||
WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP];
|
WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP];
|
||||||
WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN];
|
WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN];
|
||||||
WCHAR szNumPositiveSign[MAX_NUMPOSITIVESIGN];
|
|
||||||
WCHAR szNumListSep[MAX_NUMLISTSEP];
|
WCHAR szNumListSep[MAX_NUMLISTSEP];
|
||||||
WCHAR szNumNativeDigits[MAX_NUMNATIVEDIGITS];
|
|
||||||
INT nNumNegFormat;
|
INT nNumNegFormat;
|
||||||
INT nNumDigits;
|
INT nNumDigits;
|
||||||
INT nNumLeadingZero;
|
INT nNumLeadingZero;
|
||||||
|
@ -101,6 +103,7 @@ typedef struct _GLOBALDATA
|
||||||
INT nFirstWeekOfYear;
|
INT nFirstWeekOfYear;
|
||||||
INT nDate;
|
INT nDate;
|
||||||
INT nCalendarType;
|
INT nCalendarType;
|
||||||
|
BOOL bEnableYearNotification;
|
||||||
|
|
||||||
/* Other */
|
/* Other */
|
||||||
WCHAR szMiscCountry[MAX_MISCCOUNTRY];
|
WCHAR szMiscCountry[MAX_MISCCOUNTRY];
|
||||||
|
@ -191,6 +194,19 @@ InsSpacesFmt(PCWSTR szSourceStr, PCWSTR szFmtStr);
|
||||||
PWSTR
|
PWSTR
|
||||||
ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl);
|
ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
GetSelectedComboBoxText(
|
||||||
|
HWND hwndDlg,
|
||||||
|
INT nIdDlgItem,
|
||||||
|
PWSTR Buffer,
|
||||||
|
UINT uSize);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
GetSelectedComboBoxIndex(
|
||||||
|
HWND hwndDlg,
|
||||||
|
INT nIdDlgItem,
|
||||||
|
PINT pValue);
|
||||||
|
|
||||||
/* kblayouts.c */
|
/* kblayouts.c */
|
||||||
VOID AddNewKbLayoutsByLcid(LCID Lcid);
|
VOID AddNewKbLayoutsByLcid(LCID Lcid);
|
||||||
|
|
||||||
|
|
|
@ -171,4 +171,61 @@ ReplaceSubStr(PCWSTR szSourceStr,
|
||||||
return szDestStr;
|
return szDestStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
GetSelectedComboBoxText(
|
||||||
|
HWND hwndDlg,
|
||||||
|
INT nIdDlgItem,
|
||||||
|
PWSTR Buffer,
|
||||||
|
UINT uSize)
|
||||||
|
{
|
||||||
|
HWND hChildWnd;
|
||||||
|
PWSTR tmp;
|
||||||
|
INT nIndex;
|
||||||
|
UINT uReqSize;
|
||||||
|
|
||||||
|
/* Get handle to time format control */
|
||||||
|
hChildWnd = GetDlgItem(hwndDlg, nIdDlgItem);
|
||||||
|
if (hChildWnd == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Get index to selected time format */
|
||||||
|
nIndex = SendMessageW(hChildWnd, CB_GETCURSEL, 0, 0);
|
||||||
|
if (nIndex == CB_ERR)
|
||||||
|
{
|
||||||
|
/* No selection? Get content of the edit control */
|
||||||
|
SendMessageW(hChildWnd, WM_GETTEXT, uSize, (LPARAM)Buffer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Get requested size, including the null terminator;
|
||||||
|
* it shouldn't be required because the previous CB_LIMITTEXT,
|
||||||
|
* but it would be better to check it anyways */
|
||||||
|
uReqSize = SendMessageW(hChildWnd, CB_GETLBTEXTLEN, (WPARAM)nIndex, 0) + 1;
|
||||||
|
|
||||||
|
/* Allocate enough space to be more safe */
|
||||||
|
tmp = (PWSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, uReqSize * sizeof(WCHAR));
|
||||||
|
if (tmp != NULL)
|
||||||
|
{
|
||||||
|
/* Get selected time format text */
|
||||||
|
SendMessageW(hChildWnd, CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)tmp);
|
||||||
|
|
||||||
|
/* Finally, copy the result into the output */
|
||||||
|
wcsncpy(Buffer, tmp, uSize);
|
||||||
|
|
||||||
|
HeapFree(GetProcessHeap(), 0, tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
GetSelectedComboBoxIndex(
|
||||||
|
HWND hwndDlg,
|
||||||
|
INT nIdDlgItem,
|
||||||
|
PINT pValue)
|
||||||
|
{
|
||||||
|
*pValue = SendDlgItemMessageW(hwndDlg, nIdDlgItem, CB_GETCURSEL, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -469,195 +469,105 @@ UpdateNumSamples(HWND hwndDlg,
|
||||||
(LPARAM)OutBuffer);
|
(LPARAM)OutBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set num decimal separator */
|
|
||||||
static BOOL
|
|
||||||
SetNumDecimalSep(HWND hwndDlg,
|
|
||||||
PWSTR pszNumDecimalSep)
|
|
||||||
{
|
|
||||||
/* Get setted decimal separator */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_NUMBERDSYMBOL,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_NUMDECIMALSEP,
|
|
||||||
(LPARAM)pszNumDecimalSep);
|
|
||||||
|
|
||||||
return TRUE;
|
static
|
||||||
}
|
BOOL
|
||||||
|
GetNumberSetting(
|
||||||
/* Set number of fractional symbols */
|
HWND hwndDlg,
|
||||||
static BOOL
|
PGLOBALDATA pGlobalData)
|
||||||
SetFracSymNum(HWND hwndDlg,
|
|
||||||
PINT pnNumDigits)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted number of fractional symbols */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSNDIGDEC,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnNumDigits = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set field separator */
|
|
||||||
static BOOL
|
|
||||||
SetNumFieldSep(HWND hwndDlg,
|
|
||||||
PWSTR pszNumThousandSep)
|
|
||||||
{
|
|
||||||
/* Get thousand separator */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_NUMBERSDIGITGRSYM,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_NUMTHOUSANDSEP,
|
|
||||||
(LPARAM)pszNumThousandSep);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set number of digits in field */
|
|
||||||
static BOOL
|
|
||||||
SetFieldDigNum(HWND hwndDlg,
|
|
||||||
PINT pnNumGrouping)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted negative sum format */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSDGROUPING,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnNumGrouping = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set negative sign */
|
|
||||||
static BOOL
|
|
||||||
SetNumNegSign(HWND hwndDlg,
|
|
||||||
PWSTR pszNumNegativeSign)
|
|
||||||
{
|
|
||||||
/* Get setted negative sign */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_NUMBERSNSIGNSYM,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_NUMNEGATIVESIGN,
|
|
||||||
(LPARAM)pszNumNegativeSign);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set negative sum format */
|
|
||||||
static BOOL
|
|
||||||
SetNegSumFmt(HWND hwndDlg,
|
|
||||||
PINT pnNumNegFormat)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted negative sum format */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSNNUMFORMAT,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnNumNegFormat = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set leading zero */
|
|
||||||
static BOOL
|
|
||||||
SetNumLeadZero(HWND hwndDlg,
|
|
||||||
PINT pnNumLeadingZero)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted leading zero format */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSDISPLEADZER,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnNumLeadingZero = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set elements list separator */
|
|
||||||
static BOOL
|
|
||||||
SetNumListSep(HWND hwndDlg,
|
|
||||||
PWSTR pszNumListSep)
|
|
||||||
{
|
|
||||||
/* Get setted list separator */
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_NUMBERSLSEP,
|
|
||||||
WM_GETTEXT,
|
|
||||||
(WPARAM)MAX_NUMLISTSEP,
|
|
||||||
(LPARAM)pszNumListSep);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set units system */
|
|
||||||
static BOOL
|
|
||||||
SetNumUnitsSys(HWND hwndDlg,
|
|
||||||
PINT pnNumMeasure)
|
|
||||||
{
|
|
||||||
INT nCurrSel;
|
|
||||||
|
|
||||||
/* Get setted units system */
|
|
||||||
nCurrSel = SendDlgItemMessageW(hwndDlg, IDC_NUMBERSMEASSYS,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
(WPARAM)0,
|
|
||||||
(LPARAM)0);
|
|
||||||
if (nCurrSel == CB_ERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*pnNumMeasure = nCurrSel;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static BOOL
|
|
||||||
SetNumberSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
|
|
||||||
{
|
{
|
||||||
WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP];
|
WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP];
|
||||||
WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP];
|
WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP];
|
||||||
WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN];
|
WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN];
|
||||||
WCHAR szNumListSep[MAX_NUMLISTSEP];
|
WCHAR szNumListSep[MAX_NUMLISTSEP];
|
||||||
WCHAR szNumNativeDigits[MAX_NUMNATIVEDIGITS];
|
INT nNumDigits;
|
||||||
int nNumGrouping;
|
INT nNumGrouping;
|
||||||
int nNumDigits;
|
INT nNumNegFormat;
|
||||||
int nNumNegFormat;
|
INT nNumLeadingZero;
|
||||||
int nNumLeadingZero;
|
INT nNumMeasure;
|
||||||
int nNumMeasure;
|
|
||||||
|
|
||||||
if (!SetNumDecimalSep(hwndDlg, szNumDecimalSep) ||
|
/* Decimal symbol */
|
||||||
!SetNumFieldSep(hwndDlg, szNumThousandSep) ||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
!SetNumNegSign(hwndDlg, szNumNegativeSign) ||
|
IDC_NUMBERDSYMBOL,
|
||||||
!SetNumListSep(hwndDlg, szNumListSep) ||
|
szNumDecimalSep,
|
||||||
!SetFieldDigNum(hwndDlg, &nNumGrouping) ||
|
MAX_NUMDECIMALSEP);
|
||||||
!SetFracSymNum(hwndDlg, &nNumDigits) ||
|
|
||||||
!SetNegSumFmt(hwndDlg, &nNumNegFormat) ||
|
if (szNumDecimalSep[0] == L'\0')
|
||||||
!SetNumLeadZero(hwndDlg, &nNumLeadingZero) ||
|
|
||||||
!SetNumUnitsSys(hwndDlg, &nNumMeasure))
|
|
||||||
{
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* store to global data */
|
/* Number of digits after decimal */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_NUMBERSNDIGDEC,
|
||||||
|
&nNumDigits);
|
||||||
|
|
||||||
|
/* Digit grouping symbol */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_NUMBERSDIGITGRSYM,
|
||||||
|
szNumThousandSep,
|
||||||
|
MAX_NUMTHOUSANDSEP);
|
||||||
|
|
||||||
|
if (szNumThousandSep[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Digit grouping */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_NUMBERSDGROUPING,
|
||||||
|
&nNumGrouping);
|
||||||
|
|
||||||
|
/* Negative sign symbol */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_NUMBERSNSIGNSYM,
|
||||||
|
szNumNegativeSign,
|
||||||
|
MAX_NUMNEGATIVESIGN);
|
||||||
|
|
||||||
|
if (szNumNegativeSign[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Negative number format */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_NUMBERSNNUMFORMAT,
|
||||||
|
&nNumNegFormat);
|
||||||
|
|
||||||
|
/* Display leading zeros */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_NUMBERSDISPLEADZER,
|
||||||
|
&nNumLeadingZero);
|
||||||
|
|
||||||
|
/* List separator */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_NUMBERSLSEP,
|
||||||
|
szNumListSep,
|
||||||
|
MAX_NUMLISTSEP);
|
||||||
|
|
||||||
|
if (szNumListSep[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Measurement system */
|
||||||
|
GetSelectedComboBoxIndex(hwndDlg,
|
||||||
|
IDC_NUMBERSMEASSYS,
|
||||||
|
&nNumMeasure);
|
||||||
|
|
||||||
|
/* Store settings in global data */
|
||||||
wcscpy(pGlobalData->szNumDecimalSep, szNumDecimalSep);
|
wcscpy(pGlobalData->szNumDecimalSep, szNumDecimalSep);
|
||||||
wcscpy(pGlobalData->szNumThousandSep, szNumThousandSep);
|
wcscpy(pGlobalData->szNumThousandSep, szNumThousandSep);
|
||||||
wcscpy(pGlobalData->szNumNegativeSign, szNumNegativeSign);
|
wcscpy(pGlobalData->szNumNegativeSign, szNumNegativeSign);
|
||||||
wcscpy(pGlobalData->szNumListSep, szNumListSep);
|
wcscpy(pGlobalData->szNumListSep, szNumListSep);
|
||||||
wcscpy(pGlobalData->szNumNativeDigits, szNumNativeDigits);
|
|
||||||
pGlobalData->nNumGrouping = nNumGrouping;
|
pGlobalData->nNumGrouping = nNumGrouping;
|
||||||
pGlobalData->nNumDigits = nNumDigits;
|
pGlobalData->nNumDigits = nNumDigits;
|
||||||
pGlobalData->nNumNegFormat = nNumNegFormat;
|
pGlobalData->nNumNegFormat = nNumNegFormat;
|
||||||
|
@ -717,10 +627,9 @@ NumbersPageProc(HWND hwndDlg,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
/* If push apply button */
|
|
||||||
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
||||||
{
|
{
|
||||||
if (SetNumberSetting(hwndDlg, pGlobalData))
|
if (GetNumberSetting(hwndDlg, pGlobalData))
|
||||||
{
|
{
|
||||||
pGlobalData->bUserLocaleChanged = TRUE;
|
pGlobalData->bUserLocaleChanged = TRUE;
|
||||||
UpdateNumSamples(hwndDlg, pGlobalData);
|
UpdateNumSamples(hwndDlg, pGlobalData);
|
||||||
|
|
|
@ -51,47 +51,6 @@ UpdateTimeSample(HWND hWnd, PGLOBALDATA pGlobalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
|
||||||
GetSelectedComboEntry(HWND hwndDlg, DWORD dwIdc, WCHAR *Buffer, UINT uSize)
|
|
||||||
{
|
|
||||||
HWND hChildWnd;
|
|
||||||
PWSTR tmp;
|
|
||||||
INT nIndex;
|
|
||||||
UINT uReqSize;
|
|
||||||
|
|
||||||
/* Get handle to time format control */
|
|
||||||
hChildWnd = GetDlgItem(hwndDlg, dwIdc);
|
|
||||||
|
|
||||||
/* Get index to selected time format */
|
|
||||||
nIndex = SendMessageW(hChildWnd, CB_GETCURSEL, 0, 0);
|
|
||||||
if (nIndex == CB_ERR)
|
|
||||||
{
|
|
||||||
/* No selection? Get content of the edit control */
|
|
||||||
SendMessageW(hChildWnd, WM_GETTEXT, uSize, (LPARAM)Buffer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Get requested size, including the null terminator;
|
|
||||||
* it shouldn't be required because the previous CB_LIMITTEXT,
|
|
||||||
* but it would be better to check it anyways */
|
|
||||||
uReqSize = SendMessageW(hChildWnd, CB_GETLBTEXTLEN, (WPARAM)nIndex, 0) + 1;
|
|
||||||
|
|
||||||
/* Allocate enough space to be more safe */
|
|
||||||
tmp = (PWSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, uReqSize * sizeof(WCHAR));
|
|
||||||
if (tmp != NULL)
|
|
||||||
{
|
|
||||||
/* Get selected time format text */
|
|
||||||
SendMessageW(hChildWnd, CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)tmp);
|
|
||||||
|
|
||||||
/* Finally, copy the result into the output */
|
|
||||||
wcsncpy(Buffer, tmp, uSize);
|
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, tmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
InitTimeFormatCB(
|
InitTimeFormatCB(
|
||||||
|
@ -195,31 +154,59 @@ InitPmSymbol(
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
|
||||||
SetTimeSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
|
static
|
||||||
|
BOOL
|
||||||
|
GetTimeSetting(
|
||||||
|
HWND hwndDlg,
|
||||||
|
PGLOBALDATA pGlobalData)
|
||||||
{
|
{
|
||||||
WCHAR szTimeFormat[MAX_TIMEFORMAT];
|
WCHAR szTimeFormat[MAX_TIMEFORMAT];
|
||||||
WCHAR szTimeSep[MAX_TIMEFORMAT];
|
WCHAR szTimeSep[MAX_TIMEFORMAT];
|
||||||
WCHAR szTimeAM[MAX_TIMEFORMAT];
|
WCHAR szTimeAM[MAX_TIMEFORMAT];
|
||||||
WCHAR szTimePM[MAX_TIMEFORMAT];
|
WCHAR szTimePM[MAX_TIMEFORMAT];
|
||||||
|
|
||||||
/* Get selected/typed time format text */
|
/* Time format */
|
||||||
GetSelectedComboEntry(hwndDlg, IDC_TIMEFORMAT, szTimeFormat, MAX_TIMEFORMAT);
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_TIMEFORMAT,
|
||||||
|
szTimeFormat,
|
||||||
|
MAX_TIMEFORMAT);
|
||||||
|
|
||||||
/* Get selected/typed time separator text */
|
/* Check the time format */
|
||||||
GetSelectedComboEntry(hwndDlg, IDC_TIMESEPARATOR, szTimeSep, MAX_TIMESEPARATOR);
|
if (szTimeFormat[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
/* Get selected/typed AM symbol text */
|
|
||||||
GetSelectedComboEntry(hwndDlg, IDC_TIMEAMSYMBOL, szTimeAM, MAX_TIMEAMSYMBOL);
|
|
||||||
|
|
||||||
/* Get selected/typed PM symbol text */
|
|
||||||
GetSelectedComboEntry(hwndDlg, IDC_TIMEPMSYMBOL, szTimePM, MAX_TIMEPMSYMBOL);
|
|
||||||
|
|
||||||
/* verify values */
|
|
||||||
if (szTimeFormat[0] == L'\0' || szTimeSep[0] == L'\0')
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* store to global data */
|
/* Time separator */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_TIMESEPARATOR,
|
||||||
|
szTimeSep,
|
||||||
|
MAX_TIMESEPARATOR);
|
||||||
|
|
||||||
|
/* Check the time separator */
|
||||||
|
if (szTimeSep[0] == L'\0')
|
||||||
|
{
|
||||||
|
/* TODO: Show error message */
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AM symbol */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_TIMEAMSYMBOL,
|
||||||
|
szTimeAM,
|
||||||
|
MAX_TIMEAMSYMBOL);
|
||||||
|
|
||||||
|
/* PM symbol */
|
||||||
|
GetSelectedComboBoxText(hwndDlg,
|
||||||
|
IDC_TIMEPMSYMBOL,
|
||||||
|
szTimePM,
|
||||||
|
MAX_TIMEPMSYMBOL);
|
||||||
|
|
||||||
|
/* Store settings in global data */
|
||||||
wcscpy(pGlobalData->szTimeFormat, szTimeFormat);
|
wcscpy(pGlobalData->szTimeFormat, szTimeFormat);
|
||||||
wcscpy(pGlobalData->szTimeSep, szTimeSep);
|
wcscpy(pGlobalData->szTimeSep, szTimeSep);
|
||||||
wcscpy(pGlobalData->szTimeAM, szTimeAM);
|
wcscpy(pGlobalData->szTimeAM, szTimeAM);
|
||||||
|
@ -281,7 +268,7 @@ TimePageProc(HWND hwndDlg,
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
||||||
{
|
{
|
||||||
if (SetTimeSetting(hwndDlg, pGlobalData))
|
if (GetTimeSetting(hwndDlg, pGlobalData))
|
||||||
{
|
{
|
||||||
pGlobalData->bUserLocaleChanged = TRUE;
|
pGlobalData->bUserLocaleChanged = TRUE;
|
||||||
UpdateTimeSample(hwndDlg, pGlobalData);
|
UpdateTimeSample(hwndDlg, pGlobalData);
|
||||||
|
|
Loading…
Reference in a new issue