Author: cwittich
Date: Fri May 5 19:35:56 2006
New Revision: 21803
URL:
http://svn.reactos.ru/svn/reactos?rev=21803&view=rev
Log:
*added year selection box
*display current time
Modified:
trunk/reactos/dll/cpl/timedate/Cz.rc
trunk/reactos/dll/cpl/timedate/De.rc
trunk/reactos/dll/cpl/timedate/Dk.rc
trunk/reactos/dll/cpl/timedate/En.rc
trunk/reactos/dll/cpl/timedate/Es.rc
trunk/reactos/dll/cpl/timedate/Fr.rc
trunk/reactos/dll/cpl/timedate/Gr.rc
trunk/reactos/dll/cpl/timedate/Hu.rc
trunk/reactos/dll/cpl/timedate/Ja.rc
trunk/reactos/dll/cpl/timedate/Nl.rc
trunk/reactos/dll/cpl/timedate/Pl.rc
trunk/reactos/dll/cpl/timedate/Ru.rc
trunk/reactos/dll/cpl/timedate/Sv.rc
trunk/reactos/dll/cpl/timedate/resource.h
trunk/reactos/dll/cpl/timedate/timedate.c
Modified: trunk/reactos/dll/cpl/timedate/Cz.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Cz.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Cz.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Cz.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,10 @@
BEGIN
GROUPBOX "&Datum", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/De.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/De.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/De.rc (original)
+++ trunk/reactos/dll/cpl/timedate/De.rc Fri May 5 19:35:56 2006
@@ -8,6 +8,10 @@
BEGIN
GROUPBOX "&Datum", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Dk.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Dk.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Dk.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Dk.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,10 @@
BEGIN
GROUPBOX "&Dato", -1, 4, 2, 126, 133
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/En.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/En.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/En.rc (original)
+++ trunk/reactos/dll/cpl/timedate/En.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,11 @@
BEGIN
GROUPBOX "&Date", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
+
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Es.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Es.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Es.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Es.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,10 @@
BEGIN
GROUPBOX "&Dia", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Fr.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Fr.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Fr.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Fr.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,10 @@
BEGIN
GROUPBOX "&Date", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Gr.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Gr.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Gr.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Gr.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,11 @@
BEGIN
GROUPBOX "&Çìåñïìçíßá", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
+
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Hu.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Hu.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Hu.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Hu.rc Fri May 5 19:35:56 2006
@@ -8,6 +8,11 @@
BEGIN
GROUPBOX "&Dátum", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
+
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Ja.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Ja.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Ja.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Ja.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,11 @@
BEGIN
GROUPBOX "út(&D)", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
+
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Nl.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Nl.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Nl.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Nl.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,10 @@
BEGIN
GROUPBOX "Da&tum", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Pl.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Pl.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Pl.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Pl.rc Fri May 5 19:35:56 2006
@@ -9,6 +9,10 @@
BEGIN
GROUPBOX "&Data", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Ru.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Ru.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Ru.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Ru.rc Fri May 5 19:35:56 2006
@@ -7,6 +7,10 @@
BEGIN
GROUPBOX "&Äàòà", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/Sv.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/Sv.rc?rev=…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/Sv.rc (original)
+++ trunk/reactos/dll/cpl/timedate/Sv.rc Fri May 5 19:35:56 2006
@@ -12,6 +12,10 @@
BEGIN
GROUPBOX "&Datum", -1, 4, 2, 122, 125
COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_RIGHT | WS_GROUP
+ CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS |
+ WS_BORDER | WS_GROUP, 120, 17, 50, 12
CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
11, 37, 108, 80, WS_EX_CLIENTEDGE
Modified: trunk/reactos/dll/cpl/timedate/resource.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/resource.h…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/resource.h (original)
+++ trunk/reactos/dll/cpl/timedate/resource.h Fri May 5 19:35:56 2006
@@ -10,6 +10,8 @@
#define IDC_MONTHCALENDAR 103
#define IDC_TIMEZONE 106
#define IDC_TIMEPICKER 107
+#define IDC_YEAR 108
+#define IDC_YEARTEXT 109
#define IDD_TIMEZONEPAGE 110
#define IDC_TIMEZONELIST 111
Modified: trunk/reactos/dll/cpl/timedate/timedate.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.c…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.c (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.c Fri May 5 19:35:56 2006
@@ -5,6 +5,7 @@
* PURPOSE: ReactOS Timedate Control Panel
* COPYRIGHT: Copyright 2004-2005 Eric Kohl
* Copyright 2006 Ged Murphy <gedmurphy(a)gmail.com>
+ * Copyright 2006 Christoph v. Wittich <Christoph(a)ActiveVB.de>
*
*/
@@ -293,11 +294,21 @@
WPARAM wParam,
LPARAM lParam)
{
+ SYSTEMTIME st;
+ GetLocalTime(&st);
+
switch (uMsg)
{
case WM_INITDIALOG:
FillMonthsComboBox(GetDlgItem(hwndDlg,
IDC_MONTHCB));
+
+ SetTimer(hwndDlg, ID_TIMER, 1000, NULL);
+
+ /* set range and current year */
+ SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETRANGE, 0, MAKELONG ((short)
9999, (short) 1900));
+ SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_SETPOS, 0, MAKELONG( (short)
st.wYear, 0));
+
InitClockWindowClass();
CreateWindowExW(0,
L"ClockWndClass",
@@ -310,6 +321,11 @@
NULL);
break;
+ case WM_TIMER:
+ {
+ SendMessage(GetDlgItem(hwndDlg, IDC_TIMEPICKER), DTM_SETSYSTEMTIME, GDT_VALID,
(LPARAM) &st);
+ break;
+ }
case WM_COMMAND:
{
switch (LOWORD(wParam))
@@ -336,6 +352,25 @@
switch (lpnm->idFrom)
{
+ case IDC_YEAR:
+ switch (lpnm->code)
+ {
+ case UDN_DELTAPOS:
+ {
+ short wYear;
+ LPNMUPDOWN updown = (LPNMUPDOWN) lpnm;
+ wYear = SendMessage(GetDlgItem(hwndDlg, IDC_YEAR), UDM_GETPOS, 0, 0);
+ /* Enable the 'Apply' button */
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ ChangeMonthCalDate(GetDlgItem(hwndDlg,
+ IDC_MONTHCALENDAR),
+ -1,
+ -1,
+ wYear + updown->iDelta);
+ break;
+ }
+ }
+ break;
case IDC_TIMEPICKER:
switch (lpnm->code)
{
@@ -386,6 +421,11 @@
0);
break;
}
+ case WM_DESTROY:
+ {
+ KillTimer(hwndDlg, ID_TIMER);
+ break;
+ }
}
return FALSE;