#define _INTL_H
#include <stdarg.h>
+#include <stdlib.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winuser.h>
#include <cpl.h>
#include <setupapi.h>
-#include <tchar.h>
-#include <malloc.h>
+#include <ndk/exfuncs.h>
#include "resource.h"
#define MAX_STR_SIZE 128
#define MAX_SAMPLES_STR_SIZE 70
-#define MAX_NUMBERDSYMBOL 3
-#define MAX_NUMBERSDIGITGRSYM 3
-#define MAX_NUMBERSNSIGNSYM 4
-#define MAX_NUMBERSLSEP 3
+#define MAX_NUMDECIMALSEP 4
+#define MAX_NUMTHOUSANDSEP 4
+#define MAX_NUMNEGATIVESIGN 5
+#define MAX_NUMPOSITIVESIGN 5
+#define MAX_NUMLISTSEP 4
+#define MAX_NUMNATIVEDIGITS 11
-#define MAX_CURRENCYSYMBOL 5
-#define MAX_CURRENCYDECSEP 3
-#define MAX_CURRENCYGRPSEP 3
+#define MAX_CURRSYMBOL 13
+#define MAX_CURRDECIMALSEP 4
+#define MAX_CURRTHOUSANDSEP 4
+#define MAX_CURRGROUPING 10
#define MAX_TIMEFORMAT 80
-#define MAX_TIMESEPARATOR 3
-#define MAX_TIMEAMSYMBOL 12
-#define MAX_TIMEPMSYMBOL 12
+#define MAX_TIMESEPARATOR 4
+#define MAX_TIMEAMSYMBOL 15
+#define MAX_TIMEPMSYMBOL 15
-#define MAX_SHRTDATEFMT 80
-#define MAX_SHRTDATESEP 3
-#define MAX_LONGDATEFMT 80
+#define MAX_SHORTDATEFORMAT 80
+#define MAX_LONGDATEFORMAT 80
+#define MAX_DATESEPARATOR 4
#define MAX_YEAR_EDIT 4
+#define MAX_MISCCOUNTRY 80
+#define MAX_MISCLANGUAGE 80
+
+#define MAX_GROUPINGFORMATS 3
+
+
typedef struct _APPLET
{
UINT idIcon;
typedef struct _GLOBALDATA
{
- LCID lcid;
+ /* General */
+ WCHAR szNumPositiveSign[MAX_NUMPOSITIVESIGN];
+ WCHAR szNumNativeDigits[MAX_NUMNATIVEDIGITS];
+
+ /* Number */
+ WCHAR szNumDecimalSep[MAX_NUMDECIMALSEP];
+ WCHAR szNumThousandSep[MAX_NUMTHOUSANDSEP];
+ WCHAR szNumNegativeSign[MAX_NUMNEGATIVESIGN];
+ WCHAR szNumListSep[MAX_NUMLISTSEP];
+ INT nNumNegFormat;
+ INT nNumDigits;
+ INT nNumLeadingZero;
+ INT nNumGrouping;
+ INT nNumMeasure;
+ INT nNumShape;
+
+ /* Currency */
+ WCHAR szCurrSymbol[MAX_CURRSYMBOL];
+ WCHAR szCurrDecimalSep[MAX_CURRDECIMALSEP];
+ WCHAR szCurrThousandSep[MAX_CURRTHOUSANDSEP];
+ INT nCurrPosFormat;
+ INT nCurrNegFormat;
+ INT nCurrDigits;
+ INT nCurrGrouping;
+
+ /* Time */
+ WCHAR szTimeFormat[MAX_TIMEFORMAT];
+ WCHAR szTimeSep[MAX_TIMESEPARATOR];
+ WCHAR szTimeAM[MAX_TIMEAMSYMBOL];
+ WCHAR szTimePM[MAX_TIMEPMSYMBOL];
+ INT nTime;
+ INT nTimePrefix;
+ INT nTimeLeadingZero;
+
+ /* Date */
+ WCHAR szLongDateFormat[MAX_LONGDATEFORMAT];
+ WCHAR szShortDateFormat[MAX_SHORTDATEFORMAT];
+ WCHAR szDateSep[MAX_DATESEPARATOR];
+ INT nFirstDayOfWeek;
+ INT nFirstWeekOfYear;
+ INT nDate;
+ INT nCalendarType;
+ BOOL bEnableYearNotification;
+
+ /* Other */
+ WCHAR szMiscCountry[MAX_MISCCOUNTRY];
+ WCHAR szMiscLanguage[MAX_MISCLANGUAGE];
+ INT nMiscCountry;
+
+ LCID UserLCID;
+ LCID SystemLCID;
+ BOOL bUserLocaleChanged;
+ BOOL bApplyToDefaultUser;
+
+ GEOID geoid;
+ BOOL bGeoIdChanged;
+
+ /* Misc */
+ BOOL bIsUserAdmin;
} GLOBALDATA, *PGLOBALDATA;
+typedef struct
+{
+ UINT nInteger;
+ PWSTR pszString;
+} GROUPINGDATA;
+
extern HINSTANCE hApplet;
extern DWORD IsUnattendedSetupEnabled;
extern DWORD UnattendLCID;
+extern GROUPINGDATA GroupingFormats[MAX_GROUPINGFORMATS];
/* intl.c */
VOID PrintErrorMsgBox(UINT msg);
+INT
+ResourceMessageBox(
+ HWND hwnd,
+ UINT uType,
+ UINT uCaptionId,
+ UINT uMessageId);
+
/* languages.c */
INT_PTR CALLBACK
LanguagesPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* advanced.c */
INT_PTR CALLBACK
AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-VOID
-SetNonUnicodeLang(HWND hwnd, LCID lcid);
/* currency.c */
INT_PTR CALLBACK
INT_PTR CALLBACK
GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+PWSTR
+GetLocaleString(
+ PWSTR *pLocaleArray,
+ LCTYPE lcType);
+
/* locale.c */
INT_PTR CALLBACK
InpLocalePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
SortPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* misc.c */
-LPTSTR
-InsSpacesFmt(LPCTSTR szSourceStr, LPCTSTR szFmtStr);
+PWSTR
+InsSpacesFmt(PCWSTR szSourceStr, PCWSTR szFmtStr);
-LPTSTR
-ReplaceSubStr(LPCTSTR szSourceStr, LPCTSTR szStrToReplace, LPCTSTR szTempl);
+PWSTR
+ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl);
-LONG
-APIENTRY
-SetupApplet(HWND hwndDlg, LCID lcid);
+VOID
+GetSelectedComboBoxText(
+ HWND hwndDlg,
+ INT nIdDlgItem,
+ PWSTR Buffer,
+ UINT uSize);
+
+VOID
+GetSelectedComboBoxIndex(
+ HWND hwndDlg,
+ INT nIdDlgItem,
+ PINT pValue);
/* kblayouts.c */
VOID AddNewKbLayoutsByLcid(LCID Lcid);