Author: gedmurphy
Date: Sat Jul 8 14:20:35 2006
New Revision: 22910
URL:
http://svn.reactos.org/svn/reactos?rev=22910&view=rev
Log:
apply patch from bug 1653.
patch by Mrkaras.
unfortunately, this applet is soon the be replaced.
Modified:
trunk/reactos/dll/cpl/intl/en.rc
trunk/reactos/dll/cpl/intl/numbers.c
trunk/reactos/dll/cpl/intl/resource.h
Modified: trunk/reactos/dll/cpl/intl/en.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/en.rc?rev=229…
==============================================================================
--- trunk/reactos/dll/cpl/intl/en.rc (original)
+++ trunk/reactos/dll/cpl/intl/en.rc Sat Jul 8 14:20:35 2006
@@ -1,81 +1,183 @@
-/* $Id: intl.rc 12852 2005-01-06 13:58:04Z mf $ */
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_GENERALPAGE DIALOGEX 0, 0, 246, 188
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+#define IDC_GRP1 1
+#define IDC_STC1 2
+#define IDC_STC2 3
+#define IDC_POSITIVESAMPLE 4
+#define IDC_NEGITIVESAMPLE 5
+#define IDC_STC3 6
+#define IDC_STC4 7
+#define IDC_STC5 8
+#define IDC_STC6 9
+#define IDC_STC7 10
+#define IDC_STC9 12
+#define IDC_STC8 11
+#define IDC_STC10 13
+#define IDC_STC11 14
+#define IDC_STC12 15
+#define IDC_DECSYMBOL 16
+#define IDC_DECDIGITS 17
+#define IDC_DIGGROUPSYMBOL 18
+#define IDC_DIGGROUP 19
+#define IDC_NEGSIGN 20
+#define IDC_NEGFORMAT 21
+#define IDC_LEADZEROS 22
+#define IDC_LISTSEPERATOR 23
+#define IDC_MEASUREMENTSYS 24
+#define IDC_DIGSUBSTAT 25
+#define IDC_CBO11 1
+#define IDC_CBO12 2
+#define IDC_CBO13 3
+#define IDC_CBO14 4
+#define IDC_CBO15 5
+#define IDC_STC13 6
+#define IDC_STC14 7
+#define IDC_STC15 8
+#define IDC_STC16 9
+#define IDC_STC17 10
+#define IDC_EDT3 11
+#define IDC_STC18 12
+#define IDC_EDT4 13
+#define IDC_STC19 14
+#define IDC_GRP2 15
+#define IDC_CBO16 16
+#define IDC_CBO17 17
+#define IDC_STC20 18
+#define IDC_STC21 19
+#define IDC_GRP3 1
+#define IDC_STC22 2
+#define IDC_EDT6 4
+#define IDC_EDT5 3
+#define IDC_STC23 5
+#define IDC_UDN1 6
+#define IDC_GRP4 7
+#define IDC_STC24 8
+#define IDC_EDT7 9
+#define IDC_STC25 10
+#define IDC_CBO18 11
+#define IDC_STC26 12
+#define IDC_CBO19 13
+#define IDC_GRP5 14
+#define IDC_CBO20 15
+#define IDC_STC27 16
+#define IDC_EDT8 17
+#define IDC_STC28 18
+LANGUAGE 9,1
+IDD_GENERALPAGE DIALOGEX 0,0,246,188
CAPTION "General"
-FONT 8, "MS Shell Dlg"
+FONT 8,"MS Shell Dlg",0,0
+STYLE 0x48C00048
BEGIN
- LTEXT "Property Page 1",-1,73,74,90,8
+ CONTROL "Property Page 1",-1,"Static",0x50020000,73,74,90,8
END
-
-
-IDD_NUMBERSPAGE DIALOGEX 0, 0, 246, 188
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+IDD_NUMBERSPAGE DIALOGEX 0,0,246,204
CAPTION "Numbers"
-FONT 8, "MS Shell Dlg"
+FONT 8,"MS Shell Dlg",0,0
+STYLE 0x48C00048
BEGIN
- LTEXT "Property Page 2",-1,73,74,90,8
+ CONTROL "Sample",IDC_GRP1,"Button",0x50000007,2,1,242,28
+ CONTROL "Positive",IDC_STC1,"Static",0x50000000,8,14,26,8
+ CONTROL "Negitive",IDC_STC2,"Static",0x50000000,118,14,25,8
+ CONTROL
"",IDC_POSITIVESAMPLE,"Edit",0x50010000,34,11,66,13,0x00000200
+ CONTROL
"",IDC_NEGITIVESAMPLE,"Edit",0x50010000,146,12,84,13,0x00000200
+ CONTROL "&Decimal
symbol:",IDC_STC3,"Static",0x50000000,18,36,72,9
+ CONTROL "No. of digits af&ter
decimal:",IDC_STC4,"Static",0x50000000,18,53,92,9
+ CONTROL "Digit &grouping
symbol:",IDC_STC5,"Static",0x50000000,18,70,86,9
+ CONTROL "d&igit
grouping:",IDC_STC6,"Static",0x50000000,18,86,64,9
+ CONTROL "N&egitive sign
symbol:",IDC_STC7,"Static",0x50000000,18,103,96,9
+ CONTROL "Negitive number
&format:",IDC_STC9,"Static",0x50000000,18,120,90,9
+ CONTROL "Display leading &zeros:
",IDC_STC8,"Static",0x50000000,18,136,84,9
+ CONTROL "&List
seperator:",IDC_STC10,"Static",0x50000000,18,153,52,9
+ CONTROL "&Measurement system:
",IDC_STC11,"Static",0x50000000,18,169,94,9
+ CONTROL "Digit
&substatution:",IDC_STC12,"Static",0x50000000,18,186,80,9
+ CONTROL "",IDC_DECSYMBOL,"ComboBox",0x50010002,118,35,112,65
+ CONTROL "",IDC_DECDIGITS,"ComboBox",0x50010003,118,51,112,98
+ CONTROL "",IDC_DIGGROUPSYMBOL,"ComboBox",0x50010002,118,66,112,48
+ CONTROL "",IDC_DIGGROUP,"ComboBox",0x50010003,118,84,112,61
+ CONTROL "",IDC_NEGSIGN,"ComboBox",0x50010002,118,101,112,67
+ CONTROL "",IDC_NEGFORMAT,"ComboBox",0x50010003,118,118,112,57
+ CONTROL "",IDC_LEADZEROS,"ComboBox",0x50010003,118,134,112,57
+ CONTROL "",IDC_LISTSEPERATOR,"ComboBox",0x50010002,118,151,112,83
+ CONTROL "",IDC_MEASUREMENTSYS,"ComboBox",0x50010003,118,168,112,37
+ CONTROL "",IDC_DIGSUBSTAT,"ComboBox",0x50010003,118,186,112,37
END
-
-
-IDD_CURRENCYPAGE DIALOGEX 0, 0, 246, 188
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+IDD_CURRENCYPAGE DIALOGEX 0,0,246,188
CAPTION "Currency"
-FONT 8, "MS Shell Dlg"
+FONT 8,"MS Shell Dlg",0,0
+STYLE 0x48C00048
BEGIN
- LTEXT "Property Page 3",-1,73,74,90,8
+ CONTROL "",IDC_CBO11,"ComboBox",0x50010002,116,33,112,15
+ CONTROL "",IDC_CBO12,"ComboBox",0x50010003,116,49,112,15
+ CONTROL "",IDC_CBO13,"ComboBox",0x50010002,116,66,112,15
+ CONTROL "",IDC_CBO14,"ComboBox",0x50010003,116,90,112,15
+ CONTROL "",IDC_CBO15,"ComboBox",0x50010002,116,107,112,15
+ CONTROL "No. of digits after
decimal:",IDC_STC13,"Static",0x50000000,16,108,82,9
+ CONTROL "&Decimal
symbol:",IDC_STC14,"Static",0x50000000,16,92,82,9
+ CONTROL "&Negitive currency
format:",IDC_STC15,"Static",0x50000000,16,68,82,9
+ CONTROL "&Positive currency
format:",IDC_STC16,"Static",0x50000000,16,51,82,9
+ CONTROL "Currency
&symbol:",IDC_STC17,"Static",0x50000000,16,35,56,9
+ CONTROL "",IDC_EDT3,"Edit",0x50010000,144,11,84,13,0x00000200
+ CONTROL "Negitive",IDC_STC18,"Static",0x50000000,116,12,26,9
+ CONTROL "",IDC_EDT4,"Edit",0x50010000,32,9,66,13,0x00000200
+ CONTROL "Positive",IDC_STC19,"Static",0x50000000,6,12,26,9
+ CONTROL "Sample",IDC_GRP2,"Button",0x50000007,2,0,242,28
+ CONTROL "",IDC_CBO16,"ComboBox",0x50010003,116,131,112,15
+ CONTROL "",IDC_CBO17,"ComboBox",0x50010002,116,147,112,15
+ CONTROL "D&igit
grouping:",IDC_STC20,"Static",0x50000000,16,149,82,9
+ CONTROL "Digit &grouping
symbol:",IDC_STC21,"Static",0x50000000,16,132,82,9
END
-
-
-IDD_TIMEPAGE DIALOGEX 0, 0, 246, 188
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+IDD_TIMEPAGE DIALOGEX 0,0,246,188
CAPTION "Time"
-FONT 8, "MS Shell Dlg"
+FONT 8,"MS Shell Dlg",0,0
+STYLE 0x48C00048
BEGIN
- GROUPBOX "Appearance sample", -1, 7, 7, 228, 33, WS_CHILD | WS_VISIBLE
- LTEXT "Time sample:", -1, 13, 21, 54, 10, WS_CHILD |WS_VISIBLE | WS_GROUP
- EDITTEXT IDC_TIMESAMPLE, 68, 19, 84, 14, ES_READONLY | WS_CHILD | WS_VISIBLE |
WS_GROUP
- LTEXT "&Time format:", -1, 13, 52, 54, 10, WS_CHILD |WS_VISIBLE |
WS_GROUP
- COMBOBOX IDC_TIMEFORMAT, 68, 50, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE |
WS_TABSTOP
- LTEXT "Time &separator:", -1, 13, 70, 54, 10, WS_VISIBLE | WS_GROUP
- COMBOBOX IDC_TIMESEPARATOR, 68, 68, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE |
WS_TABSTOP
- LTEXT "A&M symbol:", -1, 13, 88, 54, 10, WS_VISIBLE | WS_GROUP
- COMBOBOX IDC_TIMEAMSYMBOL, 68, 86, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE |
WS_TABSTOP
- LTEXT "&PM symbol:", -1, 13, 106, 54, 10, WS_VISIBLE | WS_GROUP
- COMBOBOX IDC_TIMEPMSYMBOL, 68, 104, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE |
WS_TABSTOP
- GROUPBOX "", -1, 7, 124, 228, 60, WS_VISIBLE
- LTEXT "Time format notation\n\n\
-h = hour m = minute s = second t = am or pm\n\n\
-h = 12 hour H = 24 hour\n\
-hh, mm, ss = leading zero h, m, s = no leading zero",
- -1, 13, 133, 214, 47, WS_CHILD |WS_VISIBLE | WS_GROUP
+ CONTROL "Appearance sample",-1,"Button",0x50000007,7,7,228,33
+ CONTROL "Time sample:",-1,"Static",0x50020000,13,21,54,10
+ CONTROL "",IDC_TIMESAMPLE,"Edit",0x50030800,68,19,84,14,0x00000200
+ CONTROL "&Time format:",-1,"Static",0x50020000,13,52,54,10
+ CONTROL "",IDC_TIMEFORMAT,"ComboBox",0x50010003,68,48,84,100
+ CONTROL "Time &separator:",-1,"Static",0x50020000,13,70,54,10
+ CONTROL "",IDC_TIMESEPARATOR,"ComboBox",0x50010003,68,68,84,100
+ CONTROL "A&M symbol:",-1,"Static",0x50020000,13,88,54,10
+ CONTROL "",IDC_TIMEAMSYMBOL,"ComboBox",0x50010003,68,86,84,100
+ CONTROL "&PM symbol:",-1,"Static",0x50020000,13,106,54,10
+ CONTROL "",IDC_TIMEPMSYMBOL,"ComboBox",0x50010003,68,104,84,100
+ CONTROL "",-1,"Button",0x50000007,7,124,228,60
+ CONTROL "Time format notation\n\nh = hour m = minute s = second t = am or
pm\n\nh = 12 hour H = 24 hour\nhh, mm, ss = leading zero h, m, s = no leading
zero",-1,"Static",0x50020000,13,133,214,47
END
-
-
-IDD_DATEPAGE DIALOGEX 0, 0, 246, 188
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+IDD_DATEPAGE DIALOGEX 0,0,246,188
CAPTION "Date"
-FONT 8, "MS Shell Dlg"
+FONT 8,"MS Shell Dlg",0,0
+STYLE 0x48C00048
BEGIN
- LTEXT "Property Page 5",-1,73,74,90,8
+ CONTROL "Calender",IDC_GRP3,"Button",0x50000007,0,0,240,48
+ CONTROL "When a two-digit year is entered, interprete it as a year
between:",IDC_STC22,"Static",0x50000000,8,12,234,9
+ CONTROL "",IDC_EDT6,"Edit",0x50010800,12,27,32,13,0x00000200
+ CONTROL "",IDC_EDT5,"Edit",0x50010000,70,27,32,13,0x00000200
+ CONTROL "and",IDC_STC23,"Static",0x50000000,50,29,14,8
+ CONTROL "",IDC_UDN1,"msctls_updown32",0x50000000,104,27,11,13
+ CONTROL "Short date",IDC_GRP4,"Button",0x50000007,2,49,240,74
+ CONTROL "Short date
sample:",IDC_STC24,"Static",0x50000000,10,62,62,9
+ CONTROL "",IDC_EDT7,"Edit",0x50010800,72,60,164,13,0x00000200
+ CONTROL "Short date
format:",IDC_STC25,"Static",0x50000000,10,86,58,9
+ CONTROL "",IDC_CBO18,"ComboBox",0x50010002,72,84,164,13
+ CONTROL "Date
separator:",IDC_STC26,"Static",0x50000000,10,108,54,9
+ CONTROL "",IDC_CBO19,"ComboBox",0x50010002,72,107,54,13
+ CONTROL "Long date",IDC_GRP5,"Button",0x50000007,2,125,240,61
+ CONTROL "",IDC_CBO20,"ComboBox",0x50010002,72,160,164,13
+ CONTROL "Long date
format:",IDC_STC27,"Static",0x50000000,10,162,58,9
+ CONTROL "",IDC_EDT8,"Edit",0x50010800,72,134,164,13,0x00000200
+ CONTROL "Long date
sample:",IDC_STC28,"Static",0x50000000,10,136,60,9
END
-
-
-IDD_LOCALEPAGE DIALOGEX 0, 0, 246, 188
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+IDD_LOCALEPAGE DIALOGEX 0,0,246,188
CAPTION "Input Locale"
-FONT 8, "MS Shell Dlg"
+FONT 8,"MS Shell Dlg",0,0
+STYLE 0x48C00048
BEGIN
- GROUPBOX "Primary language", -1, 8, 11, 228, 74
- ICON IDC_FLAGS, IDC_ICON1, 12, 26, 21, 20, SS_ICON
- LTEXT "Select the primary language and region you want to use:", -1, 38, 25,
193, 22
- COMBOBOX IDC_LANGUAGELIST, 39, 49, 191, 83, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD |
WS_VISIBLE | WS_TABSTOP | WS_VSCROLL
+ CONTROL "Primary language",-1,"Button",0x50000007,8,11,228,74
+ CONTROL "",IDC_FLAGS,"Static",0x50000203,0,12,26,21
+ CONTROL "Select the primary language and region you want to
use:",-1,"Static",0x50020000,38,25,193,22
+ CONTROL "",IDC_LANGUAGELIST,"ComboBox",0x50210103,39,49,191,83
END
-
-
-STRINGTABLE
+STRINGTABLE DISCARDABLE
BEGIN
IDS_CPLNAME "Regional Options"
IDS_CPLDESCRIPTION "Select languages and format numbers, currencies, times and
date."
Modified: trunk/reactos/dll/cpl/intl/numbers.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/numbers.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/intl/numbers.c (original)
+++ trunk/reactos/dll/cpl/intl/numbers.c Sat Jul 8 14:20:35 2006
@@ -27,9 +27,29 @@
#include <windows.h>
#include <commctrl.h>
#include <cpl.h>
+#include <stdio.h>
#include "intl.h"
#include "resource.h"
+
+//TODO no saving has been implamented at this time, needs to be done
+//changing for example, the list sperator will not add it to the dropdown list and
should
+//the dropdown that contain certian strings are not formated acording to the LOCALE
settings
+
+static VOID
+UpdateNumbersSample(HWND hWnd)
+{
+ WCHAR SampleNumber[13];
+ WCHAR OutBuffer[25];
+
+ wcscpy(SampleNumber,L"123456789.00");
+ GetNumberFormat(LOCALE_USER_DEFAULT,0,SampleNumber,NULL,OutBuffer,sizeof(OutBuffer));
+ SendMessageW(GetDlgItem(hWnd,IDC_POSITIVESAMPLE), WM_SETTEXT, 0, (LPARAM)OutBuffer);
+
+ wcscpy(SampleNumber,L"-123456789.00");
+ GetNumberFormat(LOCALE_USER_DEFAULT,0,SampleNumber,NULL,OutBuffer,sizeof(OutBuffer));
+ SendMessageW(GetDlgItem(hWnd,IDC_NEGITIVESAMPLE), WM_SETTEXT, 0, (LPARAM)OutBuffer);
+}
/* Property page dialog callback */
@@ -42,7 +62,124 @@
switch(uMsg)
{
case WM_INITDIALOG:
- break;
+ {
+ WCHAR Buffer[80];
+ UpdateNumbersSample(hwndDlg);
+
+ //get decimal symbol
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DECSYMBOL), CB_ADDSTRING, 0, (LPARAM)Buffer);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DECSYMBOL), CB_SETCURSEL, 0, 0);
+
+ int iindex; //uses in geting item indexes
+
+ //number of decimal places
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IDIGITS, Buffer, 80);
+ int i;
+ int *countnum;
+ int iPlus;
+ for(i=0;i<10;i++)
+ {
+ iPlus = i + 48;
+ countnum = &iPlus;
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DECDIGITS), CB_ADDSTRING, 0, (LPARAM)countnum);
+ }
+ iindex = (int)Buffer[0];
+ iindex = iindex - 48;
+
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DECDIGITS), CB_SETCURSEL, iindex, 0);
+
+ //digit grouping Symbol
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUPSYMBOL), CB_ADDSTRING, 0,
(LPARAM)Buffer);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUPSYMBOL), CB_SETCURSEL, 0, 0);
+
+ //digit grouping
+ //possably this should accept any setting not just these 3 (what if the regestery is
manualy edited?)
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUP), CB_ADDSTRING, 0,
(LPARAM)L"12345678");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUP), CB_ADDSTRING, 0,
(LPARAM)L"12,345,678");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUP), CB_ADDSTRING, 0,
(LPARAM)L"1,23,45,678");
+ if(wcsncmp(Buffer,L"3;2;0",6)) {}else
+ {
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUP), CB_SETCURSEL, 0, 0);
+ }
+
+ if(wcsncmp(Buffer,L"3;0",6)) {}else
+ {
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUP), CB_SETCURSEL, 1, 0);
+ }
+
+ if(wcsncmp(Buffer,L"0;0",6)) {}else
+ {
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGGROUP), CB_SETCURSEL, 2, 0);
+ }
+
+ //Negitive sign
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SNEGATIVESIGN, Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGSIGN), CB_ADDSTRING, 0, (LPARAM)Buffer);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGSIGN), CB_SETCURSEL, 0, 0);
+
+ //Negitive number format
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_INEGSIGNPOSN, Buffer, 80);
+ //SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_ADDSTRING, 0, (LPARAM)Buffer);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_ADDSTRING, 0,
(LPARAM)L"(1.1)");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_ADDSTRING, 0, (LPARAM)L"-
1.1");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_ADDSTRING, 0, (LPARAM)L"1.1
-");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_ADDSTRING, 0,
(LPARAM)L"-1.1");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_ADDSTRING, 0,
(LPARAM)L"1.1-");
+ iindex = (int)Buffer[0];
+ iindex = iindex - 48;
+ SendMessageW(GetDlgItem(hwndDlg,IDC_NEGFORMAT), CB_SETCURSEL, iindex, 0);
+
+ //Leading zeros
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_ILZERO, Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_LEADZEROS), CB_ADDSTRING, 0,
(LPARAM)L".7");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_LEADZEROS), CB_ADDSTRING, 0,
(LPARAM)L"0.7");
+ iindex = (int)Buffer[0];
+ iindex = iindex - 48;
+ SendMessageW(GetDlgItem(hwndDlg,IDC_LEADZEROS), CB_SETCURSEL, iindex, 0);
+
+
+ //List seperator
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SLIST, Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_LISTSEPERATOR), CB_ADDSTRING, 0,
(LPARAM)Buffer);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_LISTSEPERATOR), CB_SETCURSEL, 0, 0);
+
+ //Measurement system
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IMEASURE , Buffer, 80);
+ SendMessageW(GetDlgItem(hwndDlg,IDC_MEASUREMENTSYS), CB_ADDSTRING, 0,
(LPARAM)L"Metric"); //hardcoded english strings
+ SendMessageW(GetDlgItem(hwndDlg,IDC_MEASUREMENTSYS), CB_ADDSTRING, 0,
(LPARAM)L"US");
+ iindex = (int)Buffer[0];
+ iindex = iindex - 48;
+ SendMessageW(GetDlgItem(hwndDlg,IDC_MEASUREMENTSYS), CB_SETCURSEL, iindex, 0);
//this line doesn't work
+
+ //Digit substatution -
+ //LOCALE_IDIGITSUBSTITUTION is undefined, to be done elseware?
+ //hardcoded english strings should also be removed
+ // GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IDIGITSUBSTITUTION, Buffer, 80);
+ // SendMessageW(GetDlgItem(hwndDlg,IDC_DIGSUBSTAT), CB_ADDSTRING, 0,
(LPARAM)L"Context");
+ // SendMessageW(GetDlgItem(hwndDlg,IDC_DIGSUBSTAT), CB_ADDSTRING, 0,
(LPARAM)L"None");
+ // SendMessageW(GetDlgItem(hwndDlg,IDC_DIGSUBSTAT), CB_ADDSTRING, 0,
(LPARAM)L"National");
+ // iindex = (int)Buffer[0];
+ // iindex = iindex - 48;
+ // SendMessageW(GetDlgItem(hwndDlg,IDC_DIGSUBSTAT), CB_SETCURSEL, iindex, 0);
+ //the next 2 lines should be removed when LOCALE_IDIGITSUBSTITUTION is avalable
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGSUBSTAT), CB_ADDSTRING, 0, (LPARAM)L"Not
yet avalable");
+ SendMessageW(GetDlgItem(hwndDlg,IDC_DIGSUBSTAT), CB_SETCURSEL, 0, 0);
+
+
+ //todo write data
+
+ }
+ case WM_COMMAND:
+ {
+ //UpdateNumbersSample(GetDlgItem(hwndDlg, IDC_POSITIVESAMPLE));
+ }
+ case WM_NOTIFY:
+ {
+ //UpdateNumbersSample(GetDlgItem(hwndDlg, IDC_POSITIVESAMPLE));
+ }
}
return FALSE;
}
Modified: trunk/reactos/dll/cpl/intl/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/resource.h?re…
==============================================================================
--- trunk/reactos/dll/cpl/intl/resource.h (original)
+++ trunk/reactos/dll/cpl/intl/resource.h Sat Jul 8 14:20:35 2006
@@ -16,6 +16,18 @@
#define IDC_TIMESEPARATOR 109
#define IDC_TIMEAMSYMBOL 110
#define IDC_TIMEPMSYMBOL 111
+#define IDC_POSITIVESAMPLE 4
+#define IDC_NEGITIVESAMPLE 5
+#define IDC_DECSYMBOL 16
+#define IDC_DECDIGITS 17
+#define IDC_DIGGROUPSYMBOL 18
+#define IDC_DIGGROUP 19
+#define IDC_NEGSIGN 20
+#define IDC_NEGFORMAT 21
+#define IDC_LEADZEROS 22
+#define IDC_LISTSEPERATOR 23
+#define IDC_MEASUREMENTSYS 24
+#define IDC_DIGSUBSTAT 25
#define IDD_DATEPAGE 104
#define IDD_LOCALEPAGE 105