From 76aa2a4fa33635d13653dbcff08efa71db2945c0 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Thu, 1 Jun 2006 16:25:13 +0000 Subject: [PATCH] -added a worldmap picture (source: http://en.wikipedia.org/wiki/Image:Earth_satellite_plane.jpg) svn path=/trunk/; revision=22145 --- reactos/dll/cpl/timedate/Cz.rc | 1 + reactos/dll/cpl/timedate/De.rc | 1 + reactos/dll/cpl/timedate/Dk.rc | 1 + reactos/dll/cpl/timedate/En.rc | 1 + reactos/dll/cpl/timedate/Es.rc | 1 + reactos/dll/cpl/timedate/Fr.rc | 1 + reactos/dll/cpl/timedate/Gr.rc | 1 + reactos/dll/cpl/timedate/Hu.rc | 1 + reactos/dll/cpl/timedate/Ja.rc | 1 + reactos/dll/cpl/timedate/Nl.rc | 1 + reactos/dll/cpl/timedate/Pl.rc | 1 + reactos/dll/cpl/timedate/Ru.rc | 1 + reactos/dll/cpl/timedate/Sv.rc | 1 + reactos/dll/cpl/timedate/resource.h | 6 ++++-- reactos/dll/cpl/timedate/timedate.c | 30 ++++++++++++++++++++++++++++ reactos/dll/cpl/timedate/timedate.rc | 1 + 16 files changed, 48 insertions(+), 2 deletions(-) diff --git a/reactos/dll/cpl/timedate/Cz.rc b/reactos/dll/cpl/timedate/Cz.rc index de0faf02537..33e078bc92a 100644 --- a/reactos/dll/cpl/timedate/Cz.rc +++ b/reactos/dll/cpl/timedate/Cz.rc @@ -29,6 +29,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "Provdt zmnu na letn as a zpt automaticky", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/De.rc b/reactos/dll/cpl/timedate/De.rc index de15d5f7c01..e6622236ae7 100644 --- a/reactos/dll/cpl/timedate/De.rc +++ b/reactos/dll/cpl/timedate/De.rc @@ -30,6 +30,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "&Uhr automatisch auf Sommer-/Winterzeit umstellen", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Dk.rc b/reactos/dll/cpl/timedate/Dk.rc index 8b72ee03e2c..db61c9d957a 100644 --- a/reactos/dll/cpl/timedate/Dk.rc +++ b/reactos/dll/cpl/timedate/Dk.rc @@ -30,6 +30,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "Justere uret automatisk efter &Sommertid/Vintertid.", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/En.rc b/reactos/dll/cpl/timedate/En.rc index 2c502332615..269cbff857d 100644 --- a/reactos/dll/cpl/timedate/En.rc +++ b/reactos/dll/cpl/timedate/En.rc @@ -30,6 +30,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "Automatically adjust clock for &daylight saving changes", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Es.rc b/reactos/dll/cpl/timedate/Es.rc index cb24ea27a85..1f14fcc6f01 100644 --- a/reactos/dll/cpl/timedate/Es.rc +++ b/reactos/dll/cpl/timedate/Es.rc @@ -29,6 +29,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "Automatically adjust clock for &daylight saving changes", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Fr.rc b/reactos/dll/cpl/timedate/Fr.rc index 3595c9cae6e..ad9f61b3fd7 100644 --- a/reactos/dll/cpl/timedate/Fr.rc +++ b/reactos/dll/cpl/timedate/Fr.rc @@ -29,6 +29,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "Ajuster automatiquement l'heure lors du &passage l'heure d't" IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Gr.rc b/reactos/dll/cpl/timedate/Gr.rc index 95b4fcd8f17..663c18ba108 100644 --- a/reactos/dll/cpl/timedate/Gr.rc +++ b/reactos/dll/cpl/timedate/Gr.rc @@ -30,6 +30,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX " &", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Hu.rc b/reactos/dll/cpl/timedate/Hu.rc index e4e2261578e..f2523d6e96f 100644 --- a/reactos/dll/cpl/timedate/Hu.rc +++ b/reactos/dll/cpl/timedate/Hu.rc @@ -31,6 +31,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "Automatikus tlls a nyri idszmtsra", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Ja.rc b/reactos/dll/cpl/timedate/Ja.rc index b93ad7dbb5d..a8c8fe1df73 100644 --- a/reactos/dll/cpl/timedate/Ja.rc +++ b/reactos/dll/cpl/timedate/Ja.rc @@ -30,6 +30,7 @@ FONT 9, "MS UI Gothic", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "IɃT}[ ^C̒(&D)", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Nl.rc b/reactos/dll/cpl/timedate/Nl.rc index 9fa72f05166..5d5164be8e6 100644 --- a/reactos/dll/cpl/timedate/Nl.rc +++ b/reactos/dll/cpl/timedate/Nl.rc @@ -29,6 +29,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "&Klok automatisch aanpassen aan zomertijd", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Pl.rc b/reactos/dll/cpl/timedate/Pl.rc index 0e86ce7cfc3..de5b46aa1a7 100644 --- a/reactos/dll/cpl/timedate/Pl.rc +++ b/reactos/dll/cpl/timedate/Pl.rc @@ -31,6 +31,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "&Automatycznie uwzgldnij zmiany czasu", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Ru.rc b/reactos/dll/cpl/timedate/Ru.rc index 760fb60ee19..5b0d2dca37f 100644 --- a/reactos/dll/cpl/timedate/Ru.rc +++ b/reactos/dll/cpl/timedate/Ru.rc @@ -29,6 +29,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "& ", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/Sv.rc b/reactos/dll/cpl/timedate/Sv.rc index 97f7fb27b81..b135089de0f 100644 --- a/reactos/dll/cpl/timedate/Sv.rc +++ b/reactos/dll/cpl/timedate/Sv.rc @@ -34,6 +34,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE AUTOCHECKBOX "&Justera klockan automatiskt fr sommar- och vintertid", IDC_AUTODAYLIGHT, 5, 136, 241, 10, WS_VISIBLE | WS_GROUP | WS_TABSTOP END diff --git a/reactos/dll/cpl/timedate/resource.h b/reactos/dll/cpl/timedate/resource.h index f3a2f1be91d..6ada70f4d02 100644 --- a/reactos/dll/cpl/timedate/resource.h +++ b/reactos/dll/cpl/timedate/resource.h @@ -10,12 +10,14 @@ #define IDC_MONTHCALENDAR 103 #define IDC_TIMEZONE 106 #define IDC_TIMEPICKER 107 -#define IDC_YEAR 108 -#define IDC_YEARTEXT 109 +#define IDC_YEAR 108 +#define IDC_YEARTEXT 109 #define IDD_TIMEZONEPAGE 110 #define IDC_TIMEZONELIST 111 #define IDC_AUTODAYLIGHT 113 +#define IDC_WORLD_BACKGROUND 114 +#define IDC_WORLD 115 #define IDD_INETTIMEPAGE 120 #define IDC_SERVERLIST 121 diff --git a/reactos/dll/cpl/timedate/timedate.c b/reactos/dll/cpl/timedate/timedate.c index b2e804f5d46..01bc6df43c1 100644 --- a/reactos/dll/cpl/timedate/timedate.c +++ b/reactos/dll/cpl/timedate/timedate.c @@ -50,6 +50,8 @@ BOOL bSynced = FALSE; PTIMEZONE_ENTRY TimeZoneListHead = NULL; PTIMEZONE_ENTRY TimeZoneListTail = NULL; +static HBITMAP hBitmap = NULL; +static int cxSource, cySource; /* Applets */ APPLET Applets[NUM_APPLETS] = @@ -786,14 +788,41 @@ TimeZonePageProc(HWND hwndDlg, WPARAM wParam, LPARAM lParam) { + BITMAP bitmap; + switch (uMsg) { case WM_INITDIALOG: CreateTimeZoneList(); ShowTimeZoneList(GetDlgItem(hwndDlg, IDC_TIMEZONELIST)); GetAutoDaylightInfo(GetDlgItem(hwndDlg, IDC_AUTODAYLIGHT)); + hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_WORLD), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); + if (hBitmap != NULL) + { + GetObject(hBitmap, sizeof(BITMAP), &bitmap); + + cxSource = bitmap.bmWidth; + cySource = bitmap.bmHeight; + } break; + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT lpDrawItem; + PAINTSTRUCT ps; + HDC hdc, hdcMem; + lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + hdc = BeginPaint(hwndDlg, &ps); + hdcMem = CreateCompatibleDC(hdc); + SelectObject(hdcMem, hBitmap); + StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left, lpDrawItem->rcItem.top, + lpDrawItem->rcItem.right - lpDrawItem->rcItem.left, + lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top, + hdcMem, 0, 0, cxSource, cySource, SRCCOPY); + DeleteDC(hdcMem); + EndPaint(hwndDlg, &ps); + break; + } case WM_COMMAND: if ((LOWORD(wParam) == IDC_TIMEZONELIST && HIWORD(wParam) == CBN_SELCHANGE) || (LOWORD(wParam) == IDC_AUTODAYLIGHT && HIWORD(wParam) == BN_CLICKED)) @@ -805,6 +834,7 @@ TimeZonePageProc(HWND hwndDlg, case WM_DESTROY: DestroyTimeZoneList(); + DeleteObject(hBitmap); break; case WM_NOTIFY: diff --git a/reactos/dll/cpl/timedate/timedate.rc b/reactos/dll/cpl/timedate/timedate.rc index 881690c2437..40e7de404e5 100644 --- a/reactos/dll/cpl/timedate/timedate.rc +++ b/reactos/dll/cpl/timedate/timedate.rc @@ -14,6 +14,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDC_CPLICON ICON "resources/applet.ico" +IDC_WORLD BITMAP "resources/world.bmp" #include "En.rc" #include "Cz.rc"