ReactOS  0.4.14-dev-1256-g2125fec
intl.h File Reference
#include <stdarg.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <winreg.h>
#include <winuser.h>
#include <cpl.h>
#include <setupapi.h>
#include <ndk/exfuncs.h>
#include "resource.h"
Include dependency graph for intl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _APPLET
 
struct  _GLOBALDATA
 
struct  GROUPINGDATA
 

Macros

#define WIN32_NO_STATUS
 
#define DECIMAL_RADIX   10
 
#define MAX_FMT_SIZE   30
 
#define MAX_STR_SIZE   128
 
#define MAX_SAMPLES_STR_SIZE   70
 
#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_CURRSYMBOL   13
 
#define MAX_CURRDECIMALSEP   4
 
#define MAX_CURRTHOUSANDSEP   4
 
#define MAX_CURRGROUPING   10
 
#define MAX_TIMEFORMAT   80
 
#define MAX_TIMESEPARATOR   4
 
#define MAX_TIMEAMSYMBOL   15
 
#define MAX_TIMEPMSYMBOL   15
 
#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
 

Typedefs

typedef struct _APPLET APPLET
 
typedef struct _APPLETPAPPLET
 
typedef struct _GLOBALDATA GLOBALDATA
 
typedef struct _GLOBALDATAPGLOBALDATA
 

Functions

VOID PrintErrorMsgBox (UINT msg)
 
INT ResourceMessageBox (HWND hwnd, UINT uType, UINT uCaptionId, UINT uMessageId)
 
INT_PTR CALLBACK LanguagesPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK AdvancedPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK CurrencyPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK DatePageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK GeneralPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
PWSTR GetLocaleString (PWSTR *pLocaleArray, LCTYPE lcType)
 
INT_PTR CALLBACK InpLocalePageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK NumbersPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK TimePageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL IsSortPageNeeded (LCID lcid)
 
INT_PTR CALLBACK SortPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
PWSTR InsSpacesFmt (PCWSTR szSourceStr, PCWSTR szFmtStr)
 
PWSTR 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)
 
VOID AddNewKbLayoutsByLcid (LCID Lcid)
 

Variables

HINSTANCE hApplet
 
DWORD IsUnattendedSetupEnabled
 
DWORD UnattendLCID
 
GROUPINGDATA GroupingFormats [MAX_GROUPINGFORMATS]
 

Macro Definition Documentation

◆ DECIMAL_RADIX

#define DECIMAL_RADIX   10

Definition at line 19 of file intl.h.

◆ MAX_CURRDECIMALSEP

#define MAX_CURRDECIMALSEP   4

Definition at line 34 of file intl.h.

◆ MAX_CURRGROUPING

#define MAX_CURRGROUPING   10

Definition at line 36 of file intl.h.

◆ MAX_CURRSYMBOL

#define MAX_CURRSYMBOL   13

Definition at line 33 of file intl.h.

◆ MAX_CURRTHOUSANDSEP

#define MAX_CURRTHOUSANDSEP   4

Definition at line 35 of file intl.h.

◆ MAX_DATESEPARATOR

#define MAX_DATESEPARATOR   4

Definition at line 45 of file intl.h.

◆ MAX_FMT_SIZE

#define MAX_FMT_SIZE   30

Definition at line 22 of file intl.h.

◆ MAX_GROUPINGFORMATS

#define MAX_GROUPINGFORMATS   3

Definition at line 51 of file intl.h.

◆ MAX_LONGDATEFORMAT

#define MAX_LONGDATEFORMAT   80

Definition at line 44 of file intl.h.

◆ MAX_MISCCOUNTRY

#define MAX_MISCCOUNTRY   80

Definition at line 48 of file intl.h.

◆ MAX_MISCLANGUAGE

#define MAX_MISCLANGUAGE   80

Definition at line 49 of file intl.h.

◆ MAX_NUMDECIMALSEP

#define MAX_NUMDECIMALSEP   4

Definition at line 26 of file intl.h.

◆ MAX_NUMLISTSEP

#define MAX_NUMLISTSEP   4

Definition at line 30 of file intl.h.

◆ MAX_NUMNATIVEDIGITS

#define MAX_NUMNATIVEDIGITS   11

Definition at line 31 of file intl.h.

◆ MAX_NUMNEGATIVESIGN

#define MAX_NUMNEGATIVESIGN   5

Definition at line 28 of file intl.h.

◆ MAX_NUMPOSITIVESIGN

#define MAX_NUMPOSITIVESIGN   5

Definition at line 29 of file intl.h.

◆ MAX_NUMTHOUSANDSEP

#define MAX_NUMTHOUSANDSEP   4

Definition at line 27 of file intl.h.

◆ MAX_SAMPLES_STR_SIZE

#define MAX_SAMPLES_STR_SIZE   70

Definition at line 24 of file intl.h.

◆ MAX_SHORTDATEFORMAT

#define MAX_SHORTDATEFORMAT   80

Definition at line 43 of file intl.h.

◆ MAX_STR_SIZE

#define MAX_STR_SIZE   128

Definition at line 23 of file intl.h.

◆ MAX_TIMEAMSYMBOL

#define MAX_TIMEAMSYMBOL   15

Definition at line 40 of file intl.h.

◆ MAX_TIMEFORMAT

#define MAX_TIMEFORMAT   80

Definition at line 38 of file intl.h.

◆ MAX_TIMEPMSYMBOL

#define MAX_TIMEPMSYMBOL   15

Definition at line 41 of file intl.h.

◆ MAX_TIMESEPARATOR

#define MAX_TIMESEPARATOR   4

Definition at line 39 of file intl.h.

◆ MAX_YEAR_EDIT

#define MAX_YEAR_EDIT   4

Definition at line 46 of file intl.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 7 of file intl.h.

Typedef Documentation

◆ APPLET

◆ GLOBALDATA

◆ PAPPLET

typedef struct _APPLET * PAPPLET

◆ PGLOBALDATA

Function Documentation

◆ AddNewKbLayoutsByLcid()

VOID AddNewKbLayoutsByLcid ( LCID  Lcid)

Definition at line 189 of file kblayouts.c.

190 {
191  HINF hIntlInf;
192  WCHAR szLang[CCH_LAYOUT_ID + 1], szLangID[CCH_LAYOUT_ID + 1];
193  WCHAR szLangStr[MAX_STR_SIZE], szLayoutStr[MAX_STR_SIZE], szStr[MAX_STR_SIZE];
194  INFCONTEXT InfContext;
195  LONG Count;
196  DWORD FieldCount, Index;
197 
198  GetLocaleInfoW(MAKELCID(Lcid, SORT_DEFAULT), LOCALE_ILANGUAGE, szLang, sizeof(szLang) / sizeof(WCHAR));
199  wsprintf(szLangID, L"0000%s", szLang);
200 
201  hIntlInf = SetupOpenInfFileW(L"intl.inf", NULL, INF_STYLE_WIN4, NULL);
202 
203  if (hIntlInf == INVALID_HANDLE_VALUE)
204  return;
205 
206  if (!SetupOpenAppendInfFile(NULL, hIntlInf, NULL))
207  {
208  SetupCloseInfFile(hIntlInf);
209  hIntlInf = NULL;
210  return;
211  }
212 
213  Count = SetupGetLineCount(hIntlInf, L"Locales");
214  if (Count <= 0) return;
215 
216  if (SetupFindFirstLine(hIntlInf, L"Locales", szLangID, &InfContext))
217  {
218  FieldCount = SetupGetFieldCount(&InfContext);
219 
220  if (FieldCount != 0)
221  {
222  for (Index = 5; Index <= FieldCount; Index++)
223  {
224  if (SetupGetStringField(&InfContext, Index, szStr, MAX_STR_SIZE, NULL))
225  {
226  INT i, j;
227 
228  if (wcslen(szStr) != 13) continue;
229 
230  wsprintf(szLangStr, L"0000%s", szStr);
231  szLangStr[8] = L'\0';
232 
233  for (i = 5, j = 0; i <= wcslen(szStr); i++, j++)
234  szLayoutStr[j] = szStr[i];
235 
236  AddNewLayout(szLayoutStr, szLangStr);
237  }
238  }
239  }
240  }
241  SetupCloseInfFile(hIntlInf);
242 }
#define MAKELCID(lgid, srtid)
#define INF_STYLE_WIN4
Definition: infsupp.h:41
_In_ CONST DEVPROPKEY _In_ LCID Lcid
Definition: iofuncs.h:2408
#define SetupOpenAppendInfFile
Definition: setupapi.h:2646
#define SetupFindFirstLine
Definition: setupapi.h:2619
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#define CCH_LAYOUT_ID
Definition: kblayouts.c:11
#define LOCALE_ILANGUAGE
Definition: winnls.h:25
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
int32_t INT
Definition: typedefs.h:57
static BOOL AddNewLayout(PWSTR szLayoutID, PWSTR szLangID)
Definition: kblayouts.c:122
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:43
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: lang.c:1098
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define MAX_STR_SIZE
Definition: hdwwiz.h:21
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SORT_DEFAULT
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetupGetStringField
Definition: setupapi.h:2634
ULONG WINAPI SetupGetFieldCount(IN PINFCONTEXT Context)
Definition: infsupp.c:91
static const WCHAR L[]
Definition: oid.c:1250
#define SetupGetLineCount
Definition: setupapi.h:2628
#define wsprintf
Definition: winuser.h:5840
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by GeneralPageProc().

◆ AdvancedPageProc()

INT_PTR CALLBACK AdvancedPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 423 of file advanced.c.

427 {
428  PGLOBALDATA pGlobalData;
429 
430  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
431 
432  switch (uMsg)
433  {
434  case WM_INITDIALOG:
435  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
436  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
437 
438  InitLanguagesList(hwndDlg, pGlobalData);
439  InitCodePagesList(hwndDlg);
440  break;
441 
442  case WM_COMMAND:
443  switch (LOWORD(wParam))
444  {
445  case IDC_LANGUAGE_COMBO:
446  if (HIWORD(wParam) == CBN_SELCHANGE)
447  {
448  LCID lcid;
449  INT iIndex;
450 
451  iIndex = SendMessage(hLangList, CB_GETCURSEL, 0, 0);
452  if (iIndex == CB_ERR)
453  break;
454 
455  lcid = SendMessage(hLangList, CB_GETITEMDATA, iIndex, 0);
456  if (lcid == (LCID)CB_ERR)
457  break;
458 
459  pGlobalData->SystemLCID = lcid;
460 
461  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
462  }
463  break;
464 
466  if (HIWORD(wParam) == BN_CLICKED)
467  {
469  {
470  ResourceMessageBox(hwndDlg,
474  pGlobalData->bApplyToDefaultUser = TRUE;
475  }
476  else
477  {
478  pGlobalData->bApplyToDefaultUser = FALSE;
479  }
480 
481  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
482  }
483  break;
484  }
485  break;
486 
487  case WM_NOTIFY:
488  if (((LPNMHDR)lParam)->code == PSN_APPLY)
489  {
490  PropSheet_UnChanged(GetParent(hwndDlg), hwndDlg);
491 
492  SaveSystemSettings(pGlobalData);
493  SaveFontSubstitutionSettings(hwndDlg, pGlobalData);
494  SaveFontLinkingSettings(hwndDlg, pGlobalData);
495  }
496  else if (((LPNMHDR)lParam)->idFrom == IDC_CONV_TABLES &&
498  {
499  SetWindowLongPtr(hwndDlg,
502  return TRUE;
503  }
504  break;
505  }
506 
507  return FALSE;
508 }
struct _GLOBALDATA * PGLOBALDATA
#define TRUE
Definition: types.h:120
static VOID SaveFontSubstitutionSettings(HWND hwnd, PGLOBALDATA pGlobalData)
Definition: advanced.c:289
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define IDC_CONV_TABLES
Definition: resource.h:69
DWORD LCID
Definition: nls.h:13
#define PSN_APPLY
Definition: prsht.h:117
static VOID InitLanguagesList(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: advanced.c:237
static VOID SaveFontLinkingSettings(HWND hwnd, PGLOBALDATA pGlobalData)
Definition: advanced.c:329
int32_t INT
Definition: typedefs.h:57
#define SetWindowLongPtr
Definition: treelist.c:70
#define CB_GETCURSEL
Definition: winuser.h:1925
WPARAM wParam
Definition: combotst.c:138
#define DWLP_MSGRESULT
Definition: winuser.h:864
#define MB_ICONWARNING
Definition: winuser.h:780
#define IDC_APPLY_CUR_USER_DEF_PROFILE
Definition: resource.h:68
#define IDC_LANGUAGE_COMBO
Definition: resource.h:53
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define BM_GETCHECK
Definition: winuser.h:1900
static VOID InitCodePagesList(HWND hwndDlg)
Definition: advanced.c:114
#define CB_ERR
Definition: winuser.h:2410
#define IDS_APPLY_DEFAULT_TEXT
Definition: resource.h:94
LCID SystemLCID
Definition: intl.h:114
VOID ResourceMessageBox(HINSTANCE hInstance, HWND hwnd, UINT uType, UINT uCaptionId, UINT uMessageId)
Definition: misc.c:283
#define IDS_APPLY_DEFAULT_TITLE
Definition: resource.h:93
#define PropSheet_UnChanged(d, w)
Definition: prsht.h:358
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define BN_CLICKED
Definition: winuser.h:1907
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static HWND hLangList
Definition: advanced.c:21
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
BOOL bApplyToDefaultUser
Definition: intl.h:116
HWND WINAPI GetParent(_In_ HWND)
static VOID SaveSystemSettings(PGLOBALDATA pGlobalData)
Definition: advanced.c:339
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define MB_OK
Definition: winuser.h:784
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define SendMessage
Definition: winuser.h:5818
#define HIWORD(l)
Definition: typedefs.h:246
#define GetWindowLongPtr
Definition: treelist.c:73
LRESULT ListViewCustomDraw(LPARAM lParam)
Definition: advanced.c:394
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61

◆ CurrencyPageProc()

INT_PTR CALLBACK CurrencyPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 351 of file currency.c.

355 {
356  PGLOBALDATA pGlobalData;
357 
358  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
359 
360  switch (uMsg)
361  {
362  case WM_INITDIALOG:
363  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
364  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
365 
366  InitCurrencySymbols(hwndDlg, pGlobalData);
367  InitCurrencyPositiveFormats(hwndDlg, pGlobalData);
368  InitCurrencyNegativeFormats(hwndDlg, pGlobalData);
369  InitCurrencyDecimalSeparators(hwndDlg, pGlobalData);
370  InitCurrencyNumFracDigits(hwndDlg, pGlobalData);
371  InitCurrencyGroupSeparators(hwndDlg, pGlobalData);
372  InitDigitGroupCB(hwndDlg, pGlobalData);
373  UpdateExamples(hwndDlg, pGlobalData);
374  break;
375 
376  case WM_COMMAND:
377  switch (LOWORD(wParam))
378  {
379  case IDC_CURRENCYSYMBOL:
382  case IDC_CURRENCYDECSEP:
383  case IDC_CURRENCYDECNUM:
384  case IDC_CURRENCYGRPSEP:
385  case IDC_CURRENCYGRPNUM:
386  if (HIWORD(wParam) == CBN_SELCHANGE ||
388  {
389  /* Enable the Apply button */
390  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
391  }
392  }
393  break;
394 
395  case WM_NOTIFY:
396  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
397  {
398  if (GetCurrencySetting(hwndDlg, pGlobalData))
399  {
400  pGlobalData->bUserLocaleChanged = TRUE;
401  UpdateExamples(hwndDlg, pGlobalData);
402  }
403  }
404  break;
405  }
406  return FALSE;
407 }
static VOID InitCurrencyNumFracDigits(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:182
struct _GLOBALDATA * PGLOBALDATA
static VOID UpdateExamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:34
static VOID InitCurrencyPositiveFormats(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:87
#define TRUE
Definition: types.h:120
#define IDC_CURRENCYGRPSEP
Definition: resource.h:32
BOOL bUserLocaleChanged
Definition: intl.h:115
static VOID InitDigitGroupCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:229
#define PSN_APPLY
Definition: prsht.h:117
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
static VOID InitCurrencySymbols(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:65
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define CBN_EDITCHANGE
Definition: winuser.h:1957
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define IDC_CURRENCYGRPNUM
Definition: resource.h:33
static BOOL GetCurrencySetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:266
#define IDC_CURRENCYNEGVALUE
Definition: resource.h:29
static VOID InitCurrencyDecimalSeparators(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:159
#define IDC_CURRENCYDECNUM
Definition: resource.h:31
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
#define IDC_CURRENCYSYMBOL
Definition: resource.h:27
#define IDC_CURRENCYPOSVALUE
Definition: resource.h:28
HWND WINAPI GetParent(_In_ HWND)
static VOID InitCurrencyNegativeFormats(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:123
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define IDC_CURRENCYDECSEP
Definition: resource.h:30
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define HIWORD(l)
Definition: typedefs.h:246
#define GetWindowLongPtr
Definition: treelist.c:73
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61
static VOID InitCurrencyGroupSeparators(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: currency.c:207

Referenced by CustomizeLocalePropertySheet().

◆ DatePageProc()

INT_PTR CALLBACK DatePageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 544 of file date.c.

548 {
549  PGLOBALDATA pGlobalData;
550 
551  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
552 
553  switch (uMsg)
554  {
555  case WM_INITDIALOG:
556  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
557  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
558 
559  InitMinMaxDateSpin(hwndDlg, pGlobalData);
560  UpdateDateLocaleSamples(hwndDlg, pGlobalData);
561  InitShortDateCB(hwndDlg, pGlobalData);
562  InitLongDateCB(hwndDlg, pGlobalData);
563  InitShortDateSepSamples(hwndDlg, pGlobalData);
564  /* TODO: Add other calendar types */
565  pGlobalData->bEnableYearNotification = TRUE;
566  break;
567 
568  case WM_COMMAND:
569  switch (LOWORD(wParam))
570  {
571  case IDC_SECONDYEAR_EDIT:
572  if (HIWORD(wParam) == EN_CHANGE &&
573  pGlobalData != NULL &&
574  pGlobalData->bEnableYearNotification == TRUE)
575  {
576  SetMinDate(hwndDlg);
577 
578  /* Enable the Apply button */
579  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
580  }
581  break;
582 
583  case IDC_CALTYPE_COMBO:
584  case IDC_HIJCHRON_COMBO:
588  if (HIWORD(wParam) == CBN_SELCHANGE ||
590  {
591  /* Enable the Apply button */
592  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
593  }
594  break;
595  }
596  break;
597 
598  case WM_NOTIFY:
599  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
600  {
601  if (GetDateSetting(hwndDlg, pGlobalData))
602  {
603  pGlobalData->bUserLocaleChanged = TRUE;
604  SetMaxDate(hwndDlg, pGlobalData->UserLCID);
605  UpdateDateLocaleSamples(hwndDlg, pGlobalData);
606  }
607  }
608  break;
609  }
610 
611  return FALSE;
612 }
#define IDC_LONGDATEFMT_COMBO
Definition: resource.h:65
static VOID InitShortDateSepSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:236
static VOID InitMinMaxDateSpin(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:449
struct _GLOBALDATA * PGLOBALDATA
#define TRUE
Definition: types.h:120
BOOL bEnableYearNotification
Definition: intl.h:106
static VOID UpdateDateLocaleSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:496
BOOL bUserLocaleChanged
Definition: intl.h:115
#define PSN_APPLY
Definition: prsht.h:117
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define LPPROPSHEETPAGE
Definition: prsht.h:390
smooth NULL
Definition: ftsmooth.c:416
static BOOL GetDateSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:519
static VOID SetMaxDate(HWND hwndDlg, LCID lcid)
Definition: date.c:383
#define CBN_EDITCHANGE
Definition: winuser.h:1957
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
VOID InitShortDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:295
HWND WINAPI GetParent(_In_ HWND)
#define IDC_SHRTDATEFMT_COMBO
Definition: resource.h:61
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define CBN_SELCHANGE
Definition: winuser.h:1961
static VOID SetMinDate(HWND hwndDlg)
Definition: date.c:425
static VOID InitLongDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:341
#define IDC_SECONDYEAR_EDIT
Definition: resource.h:55
#define HIWORD(l)
Definition: typedefs.h:246
#define IDC_SHRTDATESEP_COMBO
Definition: resource.h:62
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDC_CALTYPE_COMBO
Definition: resource.h:57
#define IDC_HIJCHRON_COMBO
Definition: resource.h:58
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61
LCID UserLCID
Definition: intl.h:113
#define EN_CHANGE
Definition: winuser.h:2004

Referenced by CustomizeLocalePropertySheet().

◆ GeneralPageProc()

INT_PTR CALLBACK GeneralPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 327 of file propsheet_general.c.

331 {
332  PPAGEDATA pPageData;
333 
334  /* Get the window context */
335  pPageData = (PPAGEDATA)GetWindowLongPtr(hwndDlg,
336  GWLP_USERDATA);
337  if (pPageData == NULL && uMsg != WM_INITDIALOG)
338  {
339  return FALSE;
340  }
341 
342  switch (uMsg)
343  {
344  case WM_INITDIALOG:
345  pPageData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PAGEDATA));
346  if (pPageData != NULL)
347  {
348  SetWindowLongPtr(hwndDlg,
350  (LONG_PTR)pPageData);
351 
352  pPageData->dlgInfo = (PSERVICEPROPSHEET)(((LPPROPSHEETPAGE)lParam)->lParam);
353  if (pPageData->dlgInfo != NULL)
354  {
355  InitGeneralPage(pPageData->dlgInfo, hwndDlg);
356  SetButtonStates(pPageData->dlgInfo, hwndDlg);
357  }
358  }
359  break;
360 
361  case WM_DESTROY:
362  HeapFree(GetProcessHeap(), 0, pPageData);
363  break;
364 
365  case WM_COMMAND:
366  switch(LOWORD(wParam))
367  {
368  case IDC_START_TYPE:
369  if (HIWORD(wParam) == CBN_SELCHANGE)
370  {
371  pPageData->bStartTypeChanged = TRUE;
372  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
373  }
374  break;
375 
376  case IDC_DISP_NAME:
377  if (HIWORD(wParam) == EN_CHANGE)
378  {
379  pPageData->bDisplayNameChanged = TRUE;
380  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
381  }
382  break;
383 
384  case IDC_DESCRIPTION:
385  if (HIWORD(wParam) == EN_CHANGE)
386  {
387  pPageData->bDescriptionChanged = TRUE;
388  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
389  }
390  break;
391 
392  case IDC_EXEPATH:
393  if (HIWORD(wParam) == EN_CHANGE)
394  {
395  pPageData->bBinaryPathChanged = TRUE;
396  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
397  }
398  break;
399 
400  case IDC_START:
401  {
402  WCHAR szStartParams[256];
403  LPWSTR lpStartParams = NULL;
404 
405  if (GetDlgItemText(hwndDlg, IDC_START_PARAM, szStartParams, 256) > 0)
406  lpStartParams = szStartParams;
407 
409 
410  RunActionWithProgress(hwndDlg,
411  pPageData->dlgInfo->pService->lpServiceName,
412  pPageData->dlgInfo->pService->lpDisplayName,
413  ACTION_START,
414  lpStartParams);
415 
416  UpdateServiceStatus(pPageData->dlgInfo->pService);
417  ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
418  SetButtonStates(pPageData->dlgInfo, hwndDlg);
419  SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
420  break;
421  }
422 
423  case IDC_STOP:
424  RunActionWithProgress(hwndDlg,
425  pPageData->dlgInfo->pService->lpServiceName,
426  pPageData->dlgInfo->pService->lpDisplayName,
427  ACTION_STOP,
428  NULL);
429 
430  UpdateServiceStatus(pPageData->dlgInfo->pService);
431  ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
432  SetButtonStates(pPageData->dlgInfo, hwndDlg);
433  SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
434  break;
435 
436  case IDC_PAUSE:
437  RunActionWithProgress(hwndDlg,
438  pPageData->dlgInfo->pService->lpServiceName,
439  pPageData->dlgInfo->pService->lpDisplayName,
440  ACTION_PAUSE,
441  NULL);
442 
443  UpdateServiceStatus(pPageData->dlgInfo->pService);
444  ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
445  SetButtonStates(pPageData->dlgInfo, hwndDlg);
446  SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
447  break;
448 
449  case IDC_RESUME:
450  RunActionWithProgress(hwndDlg,
451  pPageData->dlgInfo->pService->lpServiceName,
452  pPageData->dlgInfo->pService->lpDisplayName,
454  NULL);
455 
456  UpdateServiceStatus(pPageData->dlgInfo->pService);
457  ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
458  SetButtonStates(pPageData->dlgInfo, hwndDlg);
459  SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
460  break;
461 
462  case IDC_EDIT:
467  break;
468  }
469  break;
470 
471  case WM_NOTIFY:
472  switch (((LPNMHDR)lParam)->code)
473  {
474  case PSN_APPLY:
475  if (pPageData->bDisplayNameChanged ||
476  pPageData->bDescriptionChanged ||
477  pPageData->bBinaryPathChanged ||
478  pPageData->bStartTypeChanged)
479  {
480  SaveDlgInfo(pPageData, hwndDlg);
481  SetButtonStates(pPageData->dlgInfo, hwndDlg);
482  pPageData->bDisplayNameChanged = FALSE;
483  pPageData->bDescriptionChanged = FALSE;
484  pPageData->bBinaryPathChanged = FALSE;
485  pPageData->bStartTypeChanged = FALSE;
486  }
487  break;
488  }
489  break;
490  }
491 
492  return FALSE;
493 }
#define IDC_START_TYPE
Definition: resource.h:133
struct _PAGEDATA * PPAGEDATA
#define TRUE
Definition: types.h:120
#define ACTION_START
Definition: precomp.h:37
#define EM_SETREADONLY
Definition: winuser.h:1997
static VOID SetServiceStatusText(PSERVICEPROPSHEET dlgInfo, HWND hwndDlg)
#define ACTION_STOP
Definition: precomp.h:38
BOOL bDescriptionChanged
BOOL RunActionWithProgress(HWND hParent, LPWSTR ServiceName, LPWSTR DisplayName, UINT Action, PVOID Param)
Definition: progress.c:322
PSERVICEPROPSHEET dlgInfo
#define SendDlgItemMessage
Definition: winuser.h:5817
#define PSN_APPLY
Definition: prsht.h:117
BOOL bDisplayNameChanged
#define IDC_PAUSE
Definition: resource.h:75
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define IDC_START
Definition: resource.h:137
#define LVSTATUS
Definition: precomp.h:29
#define IDC_STOP
Definition: resource.h:69
#define GWLP_USERDATA
Definition: treelist.c:63
BOOL bBinaryPathChanged
#define LPPROPSHEETPAGE
Definition: prsht.h:390
smooth NULL
Definition: ftsmooth.c:416
#define ACTION_RESUME
Definition: precomp.h:40
#define WM_DESTROY
Definition: winuser.h:1591
#define GetDlgItemText
Definition: winuser.h:5760
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define IDC_DISP_NAME
Definition: resource.h:130
#define IDC_DESCRIPTION
Definition: resource.h:131
static VOID SetButtonStates(PSERVICEPROPSHEET dlgInfo, HWND hwndDlg)
BOOL bStartTypeChanged
#define WM_COMMAND
Definition: winuser.h:1722
#define IDC_START_PARAM
Definition: resource.h:135
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define ACTION_PAUSE
Definition: precomp.h:39
HWND WINAPI GetParent(_In_ HWND)
VOID ChangeListViewText(PMAIN_WND_INFO Info, ENUM_SERVICE_STATUS_PROCESS *pService, UINT Column)
Definition: listview.c:105
BOOL UpdateServiceStatus(ENUM_SERVICE_STATUS_PROCESS *pService)
Definition: query.c:373
ENUM_SERVICE_STATUS_PROCESS * pService
Definition: precomp.h:130
#define IDC_RESUME
Definition: resource.h:140
#define IDC_EDIT
Definition: resource.h:136
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define HIWORD(l)
Definition: typedefs.h:246
#define IDC_EXEPATH
Definition: resource.h:132
#define GetWindowLongPtr
Definition: treelist.c:73
WCHAR * LPWSTR
Definition: xmlstorage.h:184
struct _SERVICEPROPSHEET * PSERVICEPROPSHEET
#define WM_INITDIALOG
Definition: winuser.h:1721
static VOID InitGeneralPage(PSERVICEPROPSHEET dlgInfo, HWND hwndDlg)
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
PMAIN_WND_INFO Info
Definition: precomp.h:129
#define HeapFree(x, y, z)
Definition: compat.h:402
VOID SaveDlgInfo(PPAGEDATA pPageData, HWND hwndDlg)
#define WM_NOTIFY
Definition: richedit.h:61
#define EN_CHANGE
Definition: winuser.h:2004

◆ GetLocaleString()

PWSTR GetLocaleString ( PWSTR pLocaleArray,
LCTYPE  lcType 
)

◆ GetSelectedComboBoxIndex()

VOID GetSelectedComboBoxIndex ( HWND  hwndDlg,
INT  nIdDlgItem,
PINT  pValue 
)

Definition at line 223 of file misc.c.

227 {
228  *pValue = SendDlgItemMessageW(hwndDlg, nIdDlgItem, CB_GETCURSEL, 0, 0);
229 }
#define CB_GETCURSEL
Definition: winuser.h:1925
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by GetCurrencySetting(), and GetNumberSetting().

◆ GetSelectedComboBoxText()

VOID GetSelectedComboBoxText ( HWND  hwndDlg,
INT  nIdDlgItem,
PWSTR  Buffer,
UINT  uSize 
)

Definition at line 176 of file misc.c.

181 {
182  HWND hChildWnd;
183  PWSTR tmp;
184  INT nIndex;
185  UINT uReqSize;
186 
187  /* Get handle to time format control */
188  hChildWnd = GetDlgItem(hwndDlg, nIdDlgItem);
189  if (hChildWnd == NULL)
190  return;
191 
192  /* Get index to selected time format */
193  nIndex = SendMessageW(hChildWnd, CB_GETCURSEL, 0, 0);
194  if (nIndex == CB_ERR)
195  {
196  /* No selection? Get content of the edit control */
197  SendMessageW(hChildWnd, WM_GETTEXT, uSize, (LPARAM)Buffer);
198  }
199  else
200  {
201  /* Get requested size, including the null terminator;
202  * it shouldn't be required because the previous CB_LIMITTEXT,
203  * but it would be better to check it anyways */
204  uReqSize = SendMessageW(hChildWnd, CB_GETLBTEXTLEN, (WPARAM)nIndex, 0) + 1;
205 
206  /* Allocate enough space to be more safe */
207  tmp = (PWSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, uReqSize * sizeof(WCHAR));
208  if (tmp != NULL)
209  {
210  /* Get selected time format text */
211  SendMessageW(hChildWnd, CB_GETLBTEXT, (WPARAM)nIndex, (LPARAM)tmp);
212 
213  /* Finally, copy the result into the output */
214  wcsncpy(Buffer, tmp, uSize);
215 
216  HeapFree(GetProcessHeap(), 0, tmp);
217  }
218  }
219 }
#define CB_GETLBTEXTLEN
Definition: winuser.h:1935
#define CB_GETLBTEXT
Definition: winuser.h:1934
uint16_t * PWSTR
Definition: typedefs.h:55
#define WM_GETTEXT
Definition: winuser.h:1600
UINT_PTR WPARAM
Definition: windef.h:207
int32_t INT
Definition: typedefs.h:57
#define CB_GETCURSEL
Definition: winuser.h:1925
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
Definition: bufpool.h:45
#define CB_ERR
Definition: winuser.h:2410
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by GetCurrencySetting(), GetNumberSetting(), and GetTimeSetting().

◆ InpLocalePageProc()

INT_PTR CALLBACK InpLocalePageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 30 of file inplocale.c.

34 {
35  switch (uMsg)
36  {
37  case WM_INITDIALOG:
38  break;
39  }
40  return FALSE;
41 }
#define WM_INITDIALOG
Definition: winuser.h:1721

◆ InsSpacesFmt()

PWSTR InsSpacesFmt ( PCWSTR  szSourceStr,
PCWSTR  szFmtStr 
)

Definition at line 39 of file misc.c.

40 {
41  PWSTR pszDestStr;
42  PWSTR pszTempStr;
43  WCHAR szFmtVal[255];
44  UINT nFmtCount = 0;
45  INT nValCount = 0;
46  INT nLastVal = 0;
47  INT nSpaceOffset = 0;
48  BOOL wasNul=FALSE;
49 
50  pszDestStr = (PWSTR)HeapAlloc(GetProcessHeap(), 0, 255 * sizeof(WCHAR));
51  if (pszDestStr == NULL)
52  return NULL;
53 
54  wcscpy(pszDestStr, szSourceStr);
55 
56  /* If format is clean return source string */
57  if (!*szFmtStr)
58  return pszDestStr;
59 
60  /* Search for all format values */
61  for (nFmtCount = 0; nFmtCount <= wcslen(szFmtStr); nFmtCount++)
62  {
63  if (szFmtStr[nFmtCount] == L';' || szFmtStr[nFmtCount] == L'\0')
64  {
65  if (_wtoi(szFmtVal) == 0 && !wasNul)
66  {
67  wasNul=TRUE;
68  break;
69  }
70 
71  /* If was 0, repeat spaces */
72  if (wasNul)
73  {
74  nSpaceOffset += nLastVal;
75  }
76  else
77  {
78  nSpaceOffset += _wtoi(szFmtVal);
79  }
80 
81  szFmtVal[nValCount] = L'\0';
82  nValCount=0;
83 
84  /* Insert space to finded position plus all pos before */
85  pszTempStr = InsSpacePos(pszDestStr, nSpaceOffset);
86  wcscpy(pszDestStr,pszTempStr);
87  HeapFree(GetProcessHeap(), 0, pszTempStr);
88 
89  /* Num of spaces total increment */
90  if (!wasNul)
91  {
92  nSpaceOffset++;
93  nLastVal = _wtoi(szFmtVal);
94  }
95  }
96  else
97  {
98  szFmtVal[nValCount++] = szFmtStr[nFmtCount];
99  }
100  }
101 
102  /* Create spaces for rest part of string */
103  if (wasNul && nLastVal != 0)
104  {
105  for (nFmtCount = nSpaceOffset + nLastVal; nFmtCount < wcslen(pszDestStr); nFmtCount += nLastVal + 1)
106  {
107  pszTempStr = InsSpacePos(pszDestStr, nFmtCount);
108  wcscpy(pszDestStr, pszTempStr);
109  HeapFree(GetProcessHeap(), 0, pszTempStr);
110  }
111  }
112 
113  return pszDestStr;
114 }
#define TRUE
Definition: types.h:120
uint16_t * PWSTR
Definition: typedefs.h:55
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
int32_t INT
Definition: typedefs.h:57
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
PWSTR InsSpacePos(PCWSTR szInsStr, const int nPos)
Definition: misc.c:5
unsigned int UINT
Definition: ndis.h:50
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by InitFieldDigNumCB().

◆ IsSortPageNeeded()

BOOL IsSortPageNeeded ( LCID  lcid)

Definition at line 32 of file sort.c.

33 {
34  /* Handle special case for Spanish (Spain) */
37  return TRUE;
38 
39  userLcid = lcid;
40  bSortPage = FALSE;
41 
43 
44  return bSortPage;
45 }
#define MAKELCID(lgid, srtid)
#define TRUE
Definition: types.h:120
#define SUBLANG_SPANISH_MODERN
Definition: nls.h:338
BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
Definition: lang.c:1604
#define SORT_DEFAULT
static BOOL bSortPage
Definition: sort.c:10
#define SUBLANG_SPANISH
Definition: nls.h:336
#define MAKELANGID(p, s)
Definition: nls.h:15
static LCID userLcid
Definition: sort.c:11
#define LANG_SPANISH
Definition: nls.h:123
#define LCID_ALTERNATE_SORTS
Definition: winnls.h:200
static BOOL CALLBACK SortTestEnumProc(PWSTR lpLocale)
Definition: sort.c:17

Referenced by CustomizeLocalePropertySheet().

◆ LanguagesPageProc()

INT_PTR CALLBACK LanguagesPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 7 of file languages.c.

11 {
12  SHELLEXECUTEINFOW shInputDll;
13  PGLOBALDATA pGlobalData;
14 
15  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
16 
17  switch (uMsg)
18  {
19  case WM_INITDIALOG:
20  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
21  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
22 
23  if (!pGlobalData->bIsUserAdmin)
24  {
27  }
28  break;
29 
30  case WM_COMMAND:
31  switch (LOWORD(wParam))
32  {
33  /* If "detail" button pressed */
34  case IDC_DETAIL_BUTTON:
35  if (HIWORD(wParam) == BN_CLICKED)
36  {
37  memset(&shInputDll, 0x0, sizeof(SHELLEXECUTEINFOW));
38  shInputDll.cbSize = sizeof(shInputDll);
39  shInputDll.hwnd = hwndDlg;
40  shInputDll.lpVerb = L"open";
41  shInputDll.lpFile = L"RunDll32.exe";
42  shInputDll.lpParameters = L"shell32.dll,Control_RunDLL input.dll";
43  if (ShellExecuteExW(&shInputDll) == 0)
44  {
46  }
47  }
48  break;
49  }
50  break;
51  }
52  return FALSE;
53 }
struct _GLOBALDATA * PGLOBALDATA
#define IDS_ERROR_INPUT_DLL
Definition: resource.h:90
BOOL bIsUserAdmin
Definition: intl.h:122
GLint x0
Definition: linetemp.h:95
#define IDC_INST_FILES_FOR_RTOL_LANG
Definition: resource.h:66
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define IDC_INST_FILES_FOR_ASIAN
Definition: resource.h:67
#define LPPROPSHEETPAGE
Definition: prsht.h:390
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2255
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define BN_CLICKED
Definition: winuser.h:1907
#define IDC_DETAIL_BUTTON
Definition: resource.h:52
static const WCHAR L[]
Definition: oid.c:1250
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LPCWSTR lpParameters
Definition: shellapi.h:331
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define HIWORD(l)
Definition: typedefs.h:246
#define GetWindowLongPtr
Definition: treelist.c:73
VOID PrintErrorMsgBox(UINT msg)
Definition: intl.c:52
#define memset(x, y, z)
Definition: compat.h:39
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by Applet().

◆ NumbersPageProc()

INT_PTR CALLBACK NumbersPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 581 of file numbers.c.

585 {
586  PGLOBALDATA pGlobalData;
587 
588  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
589 
590  switch (uMsg)
591  {
592  case WM_INITDIALOG:
593  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
594  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
595 
596  InitNumDecimalSepCB(hwndDlg, pGlobalData);
597  InitNumOfFracSymbCB(hwndDlg, pGlobalData);
598  InitNumFieldSepCB(hwndDlg, pGlobalData);
599  InitFieldDigNumCB(hwndDlg, pGlobalData);
600  InitNegSignCB(hwndDlg, pGlobalData);
601  InitNegNumFmtCB(hwndDlg, pGlobalData);
602  InitLeadingZeroesCB(hwndDlg, pGlobalData);
603  InitListSepCB(hwndDlg, pGlobalData);
604  InitUnitsSysCB(hwndDlg, pGlobalData);
605  UpdateNumSamples(hwndDlg, pGlobalData);
606  break;
607 
608  case WM_COMMAND:
609  switch (LOWORD(wParam))
610  {
611  case IDC_NUMBERDSYMBOL:
612  case IDC_NUMBERSNDIGDEC:
615  case IDC_NUMBERSNSIGNSYM:
618  case IDC_NUMBERSLSEP:
619  case IDC_NUMBERSMEASSYS:
621  {
622  /* Enable the Apply button */
623  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
624  }
625  }
626  break;
627 
628  case WM_NOTIFY:
629  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
630  {
631  if (GetNumberSetting(hwndDlg, pGlobalData))
632  {
633  pGlobalData->bUserLocaleChanged = TRUE;
634  UpdateNumSamples(hwndDlg, pGlobalData);
635  }
636  }
637  break;
638  }
639  return FALSE;
640 }
static VOID InitNumOfFracSymbCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:107
static VOID InitNumDecimalSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:59
struct _GLOBALDATA * PGLOBALDATA
static VOID InitNegNumFmtCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:268
static VOID InitListSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:350
#define IDC_NUMBERSNDIGDEC
Definition: resource.h:37
#define IDC_NUMBERSDGROUPING
Definition: resource.h:39
static BOOL GetNumberSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:474
#define TRUE
Definition: numbers.c:17
#define IDC_NUMBERSNSIGNSYM
Definition: resource.h:40
BOOL bUserLocaleChanged
Definition: intl.h:115
#define IDC_NUMBERSLSEP
Definition: resource.h:43
#define PSN_APPLY
Definition: prsht.h:117
#define SetWindowLongPtr
Definition: treelist.c:70
static VOID InitNumFieldSepCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:139
WPARAM wParam
Definition: combotst.c:138
static VOID UpdateNumSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:431
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define CBN_EDITCHANGE
Definition: winuser.h:1957
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define IDC_NUMBERSNNUMFORMAT
Definition: resource.h:41
#define IDC_NUMBERSDIGITGRSYM
Definition: resource.h:38
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
static VOID InitUnitsSysCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:399
HWND WINAPI GetParent(_In_ HWND)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define IDC_NUMBERSDISPLEADZER
Definition: resource.h:42
#define IDC_NUMBERDSYMBOL
Definition: resource.h:36
static VOID InitFieldDigNumCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:187
static VOID InitNegSignCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:220
#define HIWORD(l)
Definition: typedefs.h:246
static VOID InitLeadingZeroesCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: numbers.c:315
#define GetWindowLongPtr
Definition: treelist.c:73
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_NUMBERSMEASSYS
Definition: resource.h:44
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by CustomizeLocalePropertySheet().

◆ PrintErrorMsgBox()

VOID PrintErrorMsgBox ( UINT  msg)

Definition at line 52 of file intl.c.

53 {
54  WCHAR szErrorText[BUFFERSIZE];
55  WCHAR szErrorCaption[BUFFERSIZE];
56 
57  LoadStringW(hApplet, msg, szErrorText, sizeof(szErrorText) / sizeof(WCHAR));
58  LoadStringW(hApplet, IDS_ERROR, szErrorCaption, sizeof(szErrorCaption) / sizeof(WCHAR));
59 
60  MessageBoxW(NULL, szErrorText, szErrorCaption, MB_OK | MB_ICONERROR);
61 }
HINSTANCE hApplet
Definition: intl.c:38
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
smooth NULL
Definition: ftsmooth.c:416
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MB_ICONERROR
Definition: winuser.h:781
#define MB_OK
Definition: winuser.h:784
#define msg(x)
Definition: auth_time.c:54
#define IDS_ERROR
Definition: resource.h:18
#define BUFFERSIZE
Definition: intl.c:32

Referenced by LanguagesPageProc(), LoadCurrentLocale(), SaveCurrentLocale(), SaveGeoID(), SaveSystemSettings(), SetLongDateFormat(), SetShortDateFormat(), and SetShortDateSep().

◆ ReplaceSubStr()

PWSTR ReplaceSubStr ( PCWSTR  szSourceStr,
PCWSTR  szStrToReplace,
PCWSTR  szTempl 
)

Definition at line 118 of file misc.c.

121 {
122  PWSTR szDestStr;
123  UINT nCharCnt;
124  UINT nSubStrCnt;
125  UINT nDestStrCnt;
126  UINT nFirstCharCnt;
127 
128  szDestStr = (PWSTR)HeapAlloc(GetProcessHeap(), 0, MAX_SAMPLES_STR_SIZE * sizeof(WCHAR));
129  if (szDestStr == NULL)
130  return NULL;
131 
132  nDestStrCnt = 0;
133  nFirstCharCnt = 0;
134 
135  wcscpy(szDestStr, L"");
136 
137  while (nFirstCharCnt < wcslen(szSourceStr))
138  {
139  if (szSourceStr[nFirstCharCnt] == szTempl[0])
140  {
141  nSubStrCnt = 0;
142  for (nCharCnt = nFirstCharCnt; nCharCnt < nFirstCharCnt + wcslen(szTempl); nCharCnt++)
143  {
144  if (szSourceStr[nCharCnt] == szTempl[nSubStrCnt])
145  {
146  nSubStrCnt++;
147  }
148  else
149  {
150  break;
151  }
152 
153  if (wcslen(szTempl) == nSubStrCnt)
154  {
155  wcscat(szDestStr, szStrToReplace);
156  nDestStrCnt = wcslen(szDestStr);
157  nFirstCharCnt += wcslen(szTempl) - 1;
158  break;
159  }
160  }
161  }
162  else
163  {
164  szDestStr[nDestStrCnt++] = szSourceStr[nFirstCharCnt];
165  szDestStr[nDestStrCnt] = L'\0';
166  }
167 
168  nFirstCharCnt++;
169  }
170 
171  return szDestStr;
172 }
uint16_t * PWSTR
Definition: typedefs.h:55
smooth NULL
Definition: ftsmooth.c:416
#define MAX_SAMPLES_STR_SIZE
Definition: intl.h:24
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
unsigned int UINT
Definition: ndis.h:50
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by InitLeadingZeroesCB(), InitNegNumFmtCB(), and SetShortDateFormat().

◆ ResourceMessageBox()

INT ResourceMessageBox ( HWND  hwnd,
UINT  uType,
UINT  uCaptionId,
UINT  uMessageId 
)

Definition at line 64 of file intl.c.

69 {
70  WCHAR szErrorText[BUFFERSIZE];
71  WCHAR szErrorCaption[BUFFERSIZE];
72 
73  LoadStringW(hApplet, uMessageId, szErrorText, sizeof(szErrorText) / sizeof(WCHAR));
74  LoadStringW(hApplet, uCaptionId, szErrorCaption, sizeof(szErrorCaption) / sizeof(WCHAR));
75 
76  return MessageBoxW(hwnd, szErrorText, szErrorCaption, uType);
77 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HINSTANCE hApplet
Definition: intl.c:38
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define BUFFERSIZE
Definition: intl.c:32

◆ SortPageProc()

INT_PTR CALLBACK SortPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 147 of file sort.c.

151 {
152  PGLOBALDATA pGlobalData;
153 
154  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
155 
156  switch (uMsg)
157  {
158  case WM_INITDIALOG:
159  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
160  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
161 
162  CreateSortList(GetDlgItem(hwndDlg, IDC_SORTLIST_COMBO), pGlobalData->UserLCID);
163  break;
164 
165  case WM_COMMAND:
166  switch (LOWORD(wParam))
167  {
168  case IDC_SORTLIST_COMBO:
169  if (HIWORD(wParam) == CBN_SELCHANGE)
170  {
171  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
172  }
173  break;
174  }
175  break;
176 
177  case WM_NOTIFY:
178  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
179  {
180  LCID NewLcid;
181  INT iCurSel;
182 
183  iCurSel = SendDlgItemMessage(hwndDlg,
185  CB_GETCURSEL,
186  0,
187  0);
188  if (iCurSel == CB_ERR)
189  break;
190 
191  NewLcid = SendDlgItemMessage(hwndDlg,
194  iCurSel,
195  0);
196  if (NewLcid == (LCID)CB_ERR)
197  break;
198 
199  /* Save the new LCID */
200  pGlobalData->UserLCID = NewLcid;
201  pGlobalData->bUserLocaleChanged = TRUE;
202  }
203  break;
204  }
205 
206  return FALSE;
207 }
struct _GLOBALDATA * PGLOBALDATA
#define TRUE
Definition: types.h:120
#define CB_GETITEMDATA
Definition: winuser.h:1932
BOOL bUserLocaleChanged
Definition: intl.h:115
DWORD LCID
Definition: nls.h:13
#define SendDlgItemMessage
Definition: winuser.h:5817
#define PSN_APPLY
Definition: prsht.h:117
int32_t INT
Definition: typedefs.h:57
#define SetWindowLongPtr
Definition: treelist.c:70
#define CB_GETCURSEL
Definition: winuser.h:1925
WPARAM wParam
Definition: combotst.c:138
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define CB_ERR
Definition: winuser.h:2410
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
HWND WINAPI GetParent(_In_ HWND)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define IDC_SORTLIST_COMBO
Definition: resource.h:70
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define HIWORD(l)
Definition: typedefs.h:246
#define GetWindowLongPtr
Definition: treelist.c:73
static VOID CreateSortList(HWND hwnd, LCID lcid)
Definition: sort.c:77
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NOTIFY
Definition: richedit.h:61
LCID UserLCID
Definition: intl.h:113

Referenced by CustomizeLocalePropertySheet().

◆ TimePageProc()

INT_PTR CALLBACK TimePageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 220 of file time.c.

224 {
225  PGLOBALDATA pGlobalData;
226 
227  pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
228 
229  switch (uMsg)
230  {
231  case WM_INITDIALOG:
232  pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
233  SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
234 
235  /* Get the time format */
236  InitTimeFormatCB(hwndDlg, pGlobalData);
237 
238  /* Get the time separator */
239  InitTimeSeparatorCB(hwndDlg, pGlobalData);
240 
241  /* Get the AM symbol */
242  InitAmSymbol(hwndDlg, pGlobalData);
243 
244  /* Get the PM symbol */
245  InitPmSymbol(hwndDlg, pGlobalData);
246 
247  /* Update the time format sample */
248  UpdateTimeSample(hwndDlg, pGlobalData);
249  break;
250 
251  case WM_COMMAND:
252  switch (LOWORD(wParam))
253  {
254  case IDC_TIMEFORMAT:
255  case IDC_TIMESEPARATOR:
256  case IDC_TIMEAMSYMBOL:
257  case IDC_TIMEPMSYMBOL:
258  if (HIWORD(wParam) == CBN_SELCHANGE ||
260  {
261  /* Enable the Apply button */
262  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
263  }
264  break;
265  }
266  break;
267 
268  case WM_NOTIFY:
269  if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
270  {
271  if (GetTimeSetting(hwndDlg, pGlobalData))
272  {
273  pGlobalData->bUserLocaleChanged = TRUE;
274  UpdateTimeSample(hwndDlg, pGlobalData);
275  }
276  }
277  break;
278  }
279 
280  return FALSE;
281 }
struct _GLOBALDATA * PGLOBALDATA
#define TRUE
Definition: types.h:120
static BOOL GetTimeSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: time.c:160
#define IDC_TIMEAMSYMBOL
Definition: resource.h:48
BOOL bUserLocaleChanged
Definition: intl.h:115
#define IDC_TIMEFORMAT
Definition: resource.h:46
static VOID InitPmSymbol(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: time.c:129
#define PSN_APPLY
Definition: prsht.h:117
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
#define IDC_TIMEPMSYMBOL
Definition: resource.h:49
#define LPPROPSHEETPAGE
Definition: prsht.h:390
static VOID InitAmSymbol(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: time.c:97
#define CBN_EDITCHANGE
Definition: winuser.h:1957
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define DWLP_USER
Definition: winuser.h:866
#define WM_COMMAND
Definition: winuser.h:1722
HWND WINAPI GetParent(_In_ HWND)
static VOID UpdateTimeSample(HWND hWnd, PGLOBALDATA pGlobalData)
Definition: time.c:43
#define IDC_TIMESEPARATOR
Definition: resource.h:47
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define CBN_SELCHANGE
Definition: winuser.h:1961
static VOID InitTimeSeparatorCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: time.c:76
#define HIWORD(l)
Definition: typedefs.h:246
#define GetWindowLongPtr
Definition: treelist.c:73
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
static VOID InitTimeFormatCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: time.c:56
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by CustomizeLocalePropertySheet().

Variable Documentation

◆ GroupingFormats

◆ hApplet

HINSTANCE hApplet

Definition at line 17 of file access.c.

◆ IsUnattendedSetupEnabled

DWORD IsUnattendedSetupEnabled

Definition at line 41 of file intl.c.

Referenced by GeneralPageProc(), and ParseSetupInf().

◆ UnattendLCID

DWORD UnattendLCID

Definition at line 42 of file intl.c.

Referenced by GeneralPageProc(), ParseSetupInf(), and VerifyUnattendLCID().