mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:53:05 +00:00
- Enumerate time formats.
- The user must able to change the locale id. Move it into a global structure. - User the selected locale id instead of LOCALE_USER_DEFAULT. svn path=/trunk/; revision=28996
This commit is contained in:
parent
4c8cd18f0e
commit
edc540afb1
7 changed files with 112 additions and 80 deletions
|
@ -301,7 +301,7 @@ OnInitDialog(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
|
||||||
static BOOL
|
static BOOL
|
||||||
SetCurrencyDigNum(HWND hwndDlg)
|
SetCurrencyDigNum(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
TCHAR szFieldDigNumSamples[MAX_FIELD_DIG_SAMPLES][MAX_SAMPLES_STR_SIZE]=
|
LPTSTR szFieldDigNumSamples[MAX_FIELD_DIG_SAMPLES]=
|
||||||
{
|
{
|
||||||
_T("0;0"),
|
_T("0;0"),
|
||||||
_T("3;0"),
|
_T("3;0"),
|
||||||
|
|
|
@ -540,11 +540,15 @@ DatePageProc(HWND hwndDlg,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
PGLOBALDATA pGlobalData;
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
|
||||||
|
|
||||||
InitMinMaxDateSpin(hwndDlg);
|
InitMinMaxDateSpin(hwndDlg);
|
||||||
UpdateDateLocaleSamples(hwndDlg, LOCALE_USER_DEFAULT);
|
UpdateDateLocaleSamples(hwndDlg, pGlobalData->lcid);
|
||||||
InitShortDateCB(hwndDlg);
|
InitShortDateCB(hwndDlg);
|
||||||
InitLongDateCB(hwndDlg);
|
InitLongDateCB(hwndDlg);
|
||||||
InitShortDateSepSamples(hwndDlg);
|
InitShortDateSepSamples(hwndDlg);
|
||||||
|
|
|
@ -235,6 +235,7 @@ SetNewLocale(LCID lcid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Location enumerate procedure */
|
/* Location enumerate procedure */
|
||||||
|
#if 0
|
||||||
BOOL
|
BOOL
|
||||||
CALLBACK
|
CALLBACK
|
||||||
LocationsEnumProc(GEOID gId)
|
LocationsEnumProc(GEOID gId)
|
||||||
|
@ -255,12 +256,14 @@ LocationsEnumProc(GEOID gId)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enumerate all system locations identifiers */
|
/* Enumerate all system locations identifiers */
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
CreateLocationsList(HWND hWnd)
|
CreateLocationsList(HWND hWnd)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
GEOID userGeoID;
|
GEOID userGeoID;
|
||||||
TCHAR loc[MAX_STR_SIZE];
|
TCHAR loc[MAX_STR_SIZE];
|
||||||
|
|
||||||
|
@ -280,6 +283,7 @@ CreateLocationsList(HWND hWnd)
|
||||||
CB_SELECTSTRING,
|
CB_SELECTSTRING,
|
||||||
(WPARAM) -1,
|
(WPARAM) -1,
|
||||||
(LPARAM)loc);
|
(LPARAM)loc);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
|
|
@ -14,6 +14,11 @@ typedef struct _APPLET
|
||||||
APPLET_PROC AppletProc;
|
APPLET_PROC AppletProc;
|
||||||
} APPLET, *PAPPLET;
|
} APPLET, *PAPPLET;
|
||||||
|
|
||||||
|
typedef struct _GLOBALDATA
|
||||||
|
{
|
||||||
|
LCID lcid;
|
||||||
|
} GLOBALDATA, *PGLOBALDATA;
|
||||||
|
|
||||||
extern HINSTANCE hApplet;
|
extern HINSTANCE hApplet;
|
||||||
extern DWORD IsUnattendedSetupEnabled;
|
extern DWORD IsUnattendedSetupEnabled;
|
||||||
extern DWORD UnattendLCID;
|
extern DWORD UnattendLCID;
|
||||||
|
|
|
@ -175,7 +175,7 @@ ReplaceSubStr(LPCTSTR szSourceStr,
|
||||||
|
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LCID lcid)
|
InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, PGLOBALDATA pGlobalData)
|
||||||
{
|
{
|
||||||
ZeroMemory(psp, sizeof(PROPSHEETPAGE));
|
ZeroMemory(psp, sizeof(PROPSHEETPAGE));
|
||||||
psp->dwSize = sizeof(PROPSHEETPAGE);
|
psp->dwSize = sizeof(PROPSHEETPAGE);
|
||||||
|
@ -183,7 +183,7 @@ InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LCID lcid)
|
||||||
psp->hInstance = hApplet;
|
psp->hInstance = hApplet;
|
||||||
psp->pszTemplate = MAKEINTRESOURCE(idDlg);
|
psp->pszTemplate = MAKEINTRESOURCE(idDlg);
|
||||||
psp->pfnDlgProc = DlgProc;
|
psp->pfnDlgProc = DlgProc;
|
||||||
psp->lParam = (LPARAM)lcid;
|
psp->lParam = (LPARAM)pGlobalData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,10 +194,16 @@ SetupApplet(LCID lcid)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE PsPage[NUM_SHEETS + 1];
|
PROPSHEETPAGE PsPage[NUM_SHEETS + 1];
|
||||||
PROPSHEETHEADER psh;
|
PROPSHEETHEADER psh;
|
||||||
|
PGLOBALDATA pGlobalData;
|
||||||
TCHAR Caption[MAX_STR_SIZE];
|
TCHAR Caption[MAX_STR_SIZE];
|
||||||
|
INT ret;
|
||||||
|
|
||||||
LoadString(hApplet, IDS_CUSTOMIZE_TITLE, Caption, sizeof(Caption) / sizeof(TCHAR));
|
LoadString(hApplet, IDS_CUSTOMIZE_TITLE, Caption, sizeof(Caption) / sizeof(TCHAR));
|
||||||
|
|
||||||
|
pGlobalData = (PGLOBALDATA)malloc(sizeof(GLOBALDATA));
|
||||||
|
|
||||||
|
pGlobalData->lcid = lcid;
|
||||||
|
|
||||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USECALLBACK | PSH_PROPTITLE;
|
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USECALLBACK | PSH_PROPTITLE;
|
||||||
|
@ -209,18 +215,22 @@ SetupApplet(LCID lcid)
|
||||||
psh.nStartPage = 0;
|
psh.nStartPage = 0;
|
||||||
psh.ppsp = PsPage;
|
psh.ppsp = PsPage;
|
||||||
|
|
||||||
InitPropSheetPage(&PsPage[0], IDD_NUMBERSPAGE, NumbersPageProc, lcid);
|
InitPropSheetPage(&PsPage[0], IDD_NUMBERSPAGE, NumbersPageProc, pGlobalData);
|
||||||
InitPropSheetPage(&PsPage[1], IDD_CURRENCYPAGE, CurrencyPageProc, lcid);
|
InitPropSheetPage(&PsPage[1], IDD_CURRENCYPAGE, CurrencyPageProc, pGlobalData);
|
||||||
InitPropSheetPage(&PsPage[2], IDD_TIMEPAGE, TimePageProc, lcid);
|
InitPropSheetPage(&PsPage[2], IDD_TIMEPAGE, TimePageProc, pGlobalData);
|
||||||
InitPropSheetPage(&PsPage[3], IDD_DATEPAGE, DatePageProc, lcid);
|
InitPropSheetPage(&PsPage[3], IDD_DATEPAGE, DatePageProc, pGlobalData);
|
||||||
|
|
||||||
if (IsSortPageNeeded(lcid))
|
if (IsSortPageNeeded(lcid))
|
||||||
{
|
{
|
||||||
psh.nPages++;
|
psh.nPages++;
|
||||||
InitPropSheetPage(&PsPage[4], IDD_SORTPAGE, SortPageProc, lcid);
|
InitPropSheetPage(&PsPage[4], IDD_SORTPAGE, SortPageProc, pGlobalData);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (LONG)(PropertySheet(&psh) != -1);
|
ret = PropertySheet(&psh);
|
||||||
|
|
||||||
|
free(pGlobalData);
|
||||||
|
|
||||||
|
return (LONG)(ret != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -156,14 +156,17 @@ SortPageProc(HWND hwndDlg,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
PGLOBALDATA pGlobalData;
|
||||||
|
|
||||||
|
pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
|
||||||
LCID lcid = (LCID)((LPPROPSHEETPAGE)lParam)->lParam;
|
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
|
||||||
|
|
||||||
CreateSortList(GetDlgItem(hwndDlg, IDC_SORTLIST_COMBO), lcid);
|
CreateSortList(GetDlgItem(hwndDlg, IDC_SORTLIST_COMBO), pGlobalData->lcid);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
@ -172,6 +175,28 @@ SortPageProc(HWND hwndDlg,
|
||||||
case IDC_SORTLIST_COMBO:
|
case IDC_SORTLIST_COMBO:
|
||||||
if (HIWORD(wParam) == CBN_SELCHANGE)
|
if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||||
{
|
{
|
||||||
|
LCID NewLcid;
|
||||||
|
INT iCurSel;
|
||||||
|
|
||||||
|
iCurSel = SendDlgItemMessage(hwndDlg,
|
||||||
|
IDC_SORTLIST_COMBO,
|
||||||
|
CB_GETCURSEL,
|
||||||
|
0,
|
||||||
|
0);
|
||||||
|
if (iCurSel == CB_ERR)
|
||||||
|
break;
|
||||||
|
|
||||||
|
NewLcid = SendDlgItemMessage(hwndDlg,
|
||||||
|
IDC_SORTLIST_COMBO,
|
||||||
|
CB_GETITEMDATA,
|
||||||
|
iCurSel,
|
||||||
|
0);
|
||||||
|
if (NewLcid == (LCID)CB_ERR)
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* Save the new LCID */
|
||||||
|
pGlobalData->lcid = NewLcid;
|
||||||
|
|
||||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -179,34 +204,9 @@ SortPageProc(HWND hwndDlg,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
|
if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
|
||||||
{
|
{
|
||||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
/* FIXME: Set locale ID: pGlobalData->lcid */
|
||||||
|
|
||||||
if (lpnm->code == (UINT)PSN_APPLY)
|
|
||||||
{
|
|
||||||
|
|
||||||
LCID NewLcid;
|
|
||||||
INT iCurSel;
|
|
||||||
|
|
||||||
iCurSel = SendDlgItemMessage(hwndDlg,
|
|
||||||
IDC_SORTLIST_COMBO,
|
|
||||||
CB_GETCURSEL,
|
|
||||||
0,
|
|
||||||
0);
|
|
||||||
if (iCurSel == CB_ERR)
|
|
||||||
break;
|
|
||||||
|
|
||||||
NewLcid = SendDlgItemMessage(hwndDlg,
|
|
||||||
IDC_SORTLIST_COMBO,
|
|
||||||
CB_GETITEMDATA,
|
|
||||||
iCurSel,
|
|
||||||
0);
|
|
||||||
if (NewLcid == (LCID)CB_ERR)
|
|
||||||
break;
|
|
||||||
#if 0
|
|
||||||
/* FIXME: Set locale ID */
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,22 +31,26 @@
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
/*
|
static HWND hwndEnum = NULL;
|
||||||
* TODO:
|
|
||||||
* - Enumerate available time formats (use EnumTimeFormats)
|
static BOOL CALLBACK
|
||||||
*/
|
TimeFormatEnumProc(LPTSTR lpTimeFormatString)
|
||||||
|
{
|
||||||
|
SendMessage(hwndEnum,
|
||||||
|
CB_ADDSTRING,
|
||||||
|
0,
|
||||||
|
(LPARAM)lpTimeFormatString);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
UpdateTimeSample(HWND hWnd)
|
UpdateTimeSample(HWND hWnd, LCID lcid)
|
||||||
{
|
{
|
||||||
TCHAR InBuffer[80];
|
TCHAR szBuffer[80];
|
||||||
TCHAR OutBuffer[80];
|
|
||||||
|
|
||||||
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, InBuffer, 80);
|
GetTimeFormat(lcid, 0, NULL, NULL, szBuffer, 80);
|
||||||
|
SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)szBuffer);
|
||||||
GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, InBuffer, OutBuffer, 80);
|
|
||||||
|
|
||||||
SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)OutBuffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,36 +61,41 @@ TimePageProc(HWND hwndDlg,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (uMsg)
|
PGLOBALDATA pGlobalData;
|
||||||
{
|
|
||||||
case WM_INITDIALOG:
|
pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
|
||||||
{
|
|
||||||
TCHAR Buffer[80];
|
switch (uMsg)
|
||||||
int nLen;
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
{
|
||||||
|
TCHAR Buffer[80];
|
||||||
|
int nLen;
|
||||||
|
|
||||||
|
pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
|
||||||
|
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
|
||||||
|
|
||||||
/* Update the time format sample */
|
/* Update the time format sample */
|
||||||
UpdateTimeSample(GetDlgItem(hwndDlg, IDC_TIMESAMPLE));
|
UpdateTimeSample(GetDlgItem(hwndDlg, IDC_TIMESAMPLE), pGlobalData->lcid);
|
||||||
|
|
||||||
/* Get the time format (max. 80 characters) */
|
/* Get the time format (max. 80 characters) */
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
||||||
CB_LIMITTEXT, 80, 0);
|
CB_LIMITTEXT, 80, 0);
|
||||||
|
|
||||||
/* FIXME: add available time formats to the list */
|
/* Add available time formats to the list */
|
||||||
|
hwndEnum = GetDlgItem(hwndDlg, IDC_TIMEFORMAT);
|
||||||
|
EnumTimeFormats(TimeFormatEnumProc, pGlobalData->lcid, 0);
|
||||||
|
|
||||||
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, Buffer, 80);
|
GetLocaleInfo(pGlobalData->lcid, LOCALE_STIMEFORMAT, Buffer, 80);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
||||||
CB_ADDSTRING,
|
CB_SELECTSTRING,
|
||||||
0,
|
-1,
|
||||||
(LPARAM)Buffer);
|
(LPARAM)Buffer);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
|
||||||
CB_SETCURSEL,
|
|
||||||
0, /* index */
|
|
||||||
0);
|
|
||||||
|
|
||||||
/* Get the time separator (max. 4 characters) */
|
/* Get the time separator (max. 4 characters) */
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
||||||
CB_LIMITTEXT, 4, 0);
|
CB_LIMITTEXT, 4, 0);
|
||||||
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, Buffer, 80);
|
GetLocaleInfo(pGlobalData->lcid, LOCALE_STIME, Buffer, 80);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
||||||
CB_ADDSTRING,
|
CB_ADDSTRING,
|
||||||
0,
|
0,
|
||||||
|
@ -99,7 +108,7 @@ TimePageProc(HWND hwndDlg,
|
||||||
/* Get the AM symbol (max. 9 characters) */
|
/* Get the AM symbol (max. 9 characters) */
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
||||||
CB_LIMITTEXT, 9, 0);
|
CB_LIMITTEXT, 9, 0);
|
||||||
nLen = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, Buffer, 80);
|
nLen = GetLocaleInfo(pGlobalData->lcid, LOCALE_S1159, Buffer, 80);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
||||||
CB_ADDSTRING,
|
CB_ADDSTRING,
|
||||||
0,
|
0,
|
||||||
|
@ -119,7 +128,7 @@ TimePageProc(HWND hwndDlg,
|
||||||
/* Get the PM symbol (max. 9 characters) */
|
/* Get the PM symbol (max. 9 characters) */
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPMSYMBOL),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPMSYMBOL),
|
||||||
CB_LIMITTEXT, 9, 0);
|
CB_LIMITTEXT, 9, 0);
|
||||||
nLen = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, Buffer, 80);
|
nLen = GetLocaleInfo(pGlobalData->lcid, LOCALE_S2359, Buffer, 80);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPMSYMBOL),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPMSYMBOL),
|
||||||
CB_ADDSTRING,
|
CB_ADDSTRING,
|
||||||
0,
|
0,
|
||||||
|
@ -168,14 +177,14 @@ TimePageProc(HWND hwndDlg,
|
||||||
CB_GETCURSEL, 0, 0);
|
CB_GETCURSEL, 0, 0);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEFORMAT),
|
||||||
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
||||||
SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, Buffer);
|
SetLocaleInfo(pGlobalData->lcid, LOCALE_STIMEFORMAT, Buffer);
|
||||||
|
|
||||||
/* Set time separator */
|
/* Set time separator */
|
||||||
nIndex = SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
nIndex = SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
||||||
CB_GETCURSEL, 0, 0);
|
CB_GETCURSEL, 0, 0);
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMESEPARATOR),
|
||||||
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
||||||
SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, Buffer);
|
SetLocaleInfo(pGlobalData->lcid, LOCALE_STIME, Buffer);
|
||||||
|
|
||||||
/* Set the AM symbol */
|
/* Set the AM symbol */
|
||||||
nIndex = SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
nIndex = SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
||||||
|
@ -184,11 +193,11 @@ TimePageProc(HWND hwndDlg,
|
||||||
{
|
{
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEAMSYMBOL),
|
||||||
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
||||||
SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, Buffer);
|
SetLocaleInfo(pGlobalData->lcid, LOCALE_S1159, Buffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, _T(""));
|
SetLocaleInfo(pGlobalData->lcid, LOCALE_S1159, _T(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the PM symbol */
|
/* Set the PM symbol */
|
||||||
|
@ -198,21 +207,21 @@ TimePageProc(HWND hwndDlg,
|
||||||
{
|
{
|
||||||
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPMSYMBOL),
|
SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPMSYMBOL),
|
||||||
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)Buffer);
|
||||||
SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, Buffer);
|
SetLocaleInfo(pGlobalData->lcid, LOCALE_S2359, Buffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, _T(""));
|
SetLocaleInfo(pGlobalData->lcid, LOCALE_S2359, _T(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the time format sample */
|
/* Update the time format sample */
|
||||||
UpdateTimeSample(GetDlgItem(hwndDlg, IDC_TIMESAMPLE));
|
UpdateTimeSample(GetDlgItem(hwndDlg, IDC_TIMESAMPLE), pGlobalData->lcid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue