https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3aa5e8b897d4962080ecc…
commit 3aa5e8b897d4962080ecc765ad6b1aa50d6d886a
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Sat Oct 1 15:42:49 2022 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Mon Oct 3 17:34:09 2022 +0300
[DESK] Show monitor on "Settings" page when only one monitor detected
Hide multiple monitor selection controls in this case.
Otherwise, show them when multiple monitors are detected
and hide the monitor preview bitmap.
This fixes the focus on the resolution slider when tested in Windows XP.
Also use the monitor bitmap globally, because it's used on multiple pages.
CORE-17939 CORE-10606
---
dll/cpl/desk/background.c | 37 +++++--------------------------
dll/cpl/desk/desk.c | 13 +++++++++++
dll/cpl/desk/desk.h | 18 +++++++++++++++
dll/cpl/desk/lang/bg-BG.rc | 3 ++-
dll/cpl/desk/lang/cs-CZ.rc | 3 ++-
dll/cpl/desk/lang/de-DE.rc | 3 ++-
dll/cpl/desk/lang/el-GR.rc | 3 ++-
dll/cpl/desk/lang/en-GB.rc | 3 ++-
dll/cpl/desk/lang/en-US.rc | 3 ++-
dll/cpl/desk/lang/es-ES.rc | 3 ++-
dll/cpl/desk/lang/et-EE.rc | 3 ++-
dll/cpl/desk/lang/fr-FR.rc | 3 ++-
dll/cpl/desk/lang/he-IL.rc | 3 ++-
dll/cpl/desk/lang/hu-HU.rc | 3 ++-
dll/cpl/desk/lang/id-ID.rc | 3 ++-
dll/cpl/desk/lang/it-IT.rc | 3 ++-
dll/cpl/desk/lang/ja-JP.rc | 3 ++-
dll/cpl/desk/lang/nl-NL.rc | 3 ++-
dll/cpl/desk/lang/no-NO.rc | 3 ++-
dll/cpl/desk/lang/pl-PL.rc | 3 ++-
dll/cpl/desk/lang/pt-BR.rc | 3 ++-
dll/cpl/desk/lang/pt-PT.rc | 3 ++-
dll/cpl/desk/lang/ro-RO.rc | 3 ++-
dll/cpl/desk/lang/ru-RU.rc | 3 ++-
dll/cpl/desk/lang/sk-SK.rc | 3 ++-
dll/cpl/desk/lang/sq-AL.rc | 3 ++-
dll/cpl/desk/lang/sv-SE.rc | 3 ++-
dll/cpl/desk/lang/tr-TR.rc | 3 ++-
dll/cpl/desk/lang/uk-UA.rc | 3 ++-
dll/cpl/desk/lang/zh-CN.rc | 3 ++-
dll/cpl/desk/lang/zh-HK.rc | 3 ++-
dll/cpl/desk/lang/zh-TW.rc | 3 ++-
dll/cpl/desk/resource.h | 8 ++++---
dll/cpl/desk/settings.c | 55 ++++++++++++++++++++++++++++++++++++++++++++--
34 files changed, 152 insertions(+), 66 deletions(-)
diff --git a/dll/cpl/desk/background.c b/dll/cpl/desk/background.c
index 8497f83f9f7..36deadb5e45 100644
--- a/dll/cpl/desk/background.c
+++ b/dll/cpl/desk/background.c
@@ -37,18 +37,6 @@ typedef enum
PLACEMENT_VALUE_FILL = 10
} PLACEMENT_VALUE;
-/* The values in these macros are dependent on the
- * layout of the monitor image and they must be adjusted
- * if that image will be changed.
- */
-#define MONITOR_LEFT 20
-#define MONITOR_TOP 8
-#define MONITOR_RIGHT 140
-#define MONITOR_BOTTOM 92
-
-#define MONITOR_WIDTH (MONITOR_RIGHT-MONITOR_LEFT)
-#define MONITOR_HEIGHT (MONITOR_BOTTOM-MONITOR_TOP)
-
typedef struct
{
BOOL bWallpaper; /* Is this background a wallpaper */
@@ -74,10 +62,6 @@ typedef struct _BACKGROUND_DATA
int listViewItemCount;
- HBITMAP hBitmap;
- int cxSource;
- int cySource;
-
ULONG_PTR gdipToken;
} BACKGROUND_DATA, *PBACKGROUND_DATA;
@@ -468,7 +452,6 @@ InitBackgroundDialog(HWND hwndDlg, PBACKGROUND_DATA pData)
HKEY regKey;
TCHAR szBuffer[3];
DWORD bufferSize = sizeof(szBuffer);
- BITMAP bitmap;
AddListViewItems(hwndDlg, pData);
@@ -490,15 +473,6 @@ InitBackgroundDialog(HWND hwndDlg, PBACKGROUND_DATA pData)
SendDlgItemMessage(hwndDlg, IDC_PLACEMENT_COMBO, CB_SETCURSEL, PLACEMENT_CENTER, 0);
pData->placementSelection = PLACEMENT_CENTER;
- pData->hBitmap = (HBITMAP) LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR),
IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
- if (pData->hBitmap != NULL)
- {
- GetObject(pData->hBitmap, sizeof(BITMAP), &bitmap);
-
- pData->cxSource = bitmap.bmWidth;
- pData->cySource = bitmap.bmHeight;
- }
-
/* Load the default settings from the registry */
if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0,
KEY_QUERY_VALUE, ®Key) != ERROR_SUCCESS)
{
@@ -822,7 +796,7 @@ DrawBackgroundPreview(LPDRAWITEMSTRUCT draw, PBACKGROUND_DATA pData)
};
hDC = CreateCompatibleDC(draw->hDC);
- hOldObj = SelectObject(hDC, pData->hBitmap);
+ hOldObj = SelectObject(hDC, g_GlobalData.hMonitorBitmap);
if (pData->backgroundItems[pData->backgroundSelection].bWallpaper == FALSE)
{
@@ -997,12 +971,12 @@ DrawBackgroundPreview(LPDRAWITEMSTRUCT draw, PBACKGROUND_DATA
pData)
GdiTransparentBlt(draw->hDC,
draw->rcItem.left, draw->rcItem.top,
- draw->rcItem.right-draw->rcItem.left+1,
- draw->rcItem.bottom-draw->rcItem.top+1,
+ draw->rcItem.right - draw->rcItem.left + 1,
+ draw->rcItem.bottom - draw->rcItem.top + 1,
hDC,
0, 0,
- pData->cxSource, pData->cySource,
- 0xFF00FF);
+ g_GlobalData.bmMonWidth, g_GlobalData.bmMonHeight,
+ MONITOR_ALPHA);
SelectObject(hDC, hOldObj);
DeleteDC(hDC);
@@ -1265,7 +1239,6 @@ BackgroundPageProc(HWND hwndDlg,
if (pData->pWallpaperBitmap != NULL)
DibFreeImage(pData->pWallpaperBitmap);
- DeleteObject(pData->hBitmap);
GdiplusShutdown(pData->gdipToken);
HeapFree(GetProcessHeap(), 0, pData);
break;
diff --git a/dll/cpl/desk/desk.c b/dll/cpl/desk/desk.c
index a5df62885a2..7a34e2420b4 100644
--- a/dll/cpl/desk/desk.c
+++ b/dll/cpl/desk/desk.c
@@ -150,6 +150,7 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
LPCWSTR pwszFile = NULL;
LPCWSTR pwszAction = NULL;
INT nPage = 0;
+ BITMAP bitmap;
UNREFERENCED_PARAMETER(wParam);
@@ -197,6 +198,16 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
g_GlobalData.pwszAction = pwszAction;
g_GlobalData.desktop_color = GetSysColor(COLOR_DESKTOP);
+ /* Initialize the monitor preview bitmap, used on multiple pages */
+ g_GlobalData.hMonitorBitmap = LoadBitmapW(hApplet, MAKEINTRESOURCEW(IDC_MONITOR));
+ if (g_GlobalData.hMonitorBitmap != NULL)
+ {
+ GetObjectW(g_GlobalData.hMonitorBitmap, sizeof(bitmap), &bitmap);
+
+ g_GlobalData.bmMonWidth = bitmap.bmWidth;
+ g_GlobalData.bmMonHeight = bitmap.bmHeight;
+ }
+
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_USECALLBACK | PSH_PROPTITLE | PSH_USEICONID;
@@ -238,6 +249,8 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
PropertySheet(&psh);
cleanup:
+ DeleteObject(g_GlobalData.hMonitorBitmap);
+
if (hpsxa != NULL)
SHDestroyPropSheetExtArray(hpsxa);
diff --git a/dll/cpl/desk/desk.h b/dll/cpl/desk/desk.h
index 36470ffe8a3..efc21306281 100644
--- a/dll/cpl/desk/desk.h
+++ b/dll/cpl/desk/desk.h
@@ -63,6 +63,21 @@ INT AllocAndLoadString(LPTSTR *lpTarget,
ULONG __cdecl DbgPrint(PCCH Format,...);
+/*
+ * The values in these macros are dependent on the
+ * layout of the monitor image and they must be adjusted
+ * if that image is changed.
+ */
+#define MONITOR_LEFT 20
+#define MONITOR_TOP 8
+#define MONITOR_RIGHT 140
+#define MONITOR_BOTTOM 92
+
+#define MONITOR_WIDTH (MONITOR_RIGHT-MONITOR_LEFT)
+#define MONITOR_HEIGHT (MONITOR_BOTTOM-MONITOR_TOP)
+
+#define MONITOR_ALPHA 0xFF00FF
+
#define MAX_DESK_PAGES 32
#define NUM_SPECTRUM_BITMAPS 3
@@ -106,6 +121,9 @@ typedef struct _GLOBAL_DATA
COLORREF desktop_color;
LPCWSTR pwszFile;
LPCWSTR pwszAction;
+ HBITMAP hMonitorBitmap;
+ LONG bmMonWidth;
+ LONG bmMonHeight;
} GLOBAL_DATA, *PGLOBAL_DATA;
extern GLOBAL_DATA g_GlobalData;
diff --git a/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc
index d14d3904c3c..8018fa5c00f 100644
--- a/dll/cpl/desk/lang/bg-BG.rc
+++ b/dll/cpl/desk/lang/bg-BG.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Настройки"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Завлачете значетата на мониторите така, че да отговарят на действителното
разположение на мониторите ви.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Завлачете значетата на мониторите така, че да отговарят на действителното
разположение на мониторите ви.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Екран:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc
index 46217e5568f..73c515cc645 100644
--- a/dll/cpl/desk/lang/cs-CZ.rc
+++ b/dll/cpl/desk/lang/cs-CZ.rc
@@ -140,7 +140,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Nastavení"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Tažením nastavte ikony monitorů, aby odpovídaly fyzickému uspořádání
vašich monitorů.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Tažením nastavte ikony monitorů, aby odpovídaly fyzickému uspořádání
vašich monitorů.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Obrazovka:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc
index a1d0ea3baca..b6eea5450c1 100644
--- a/dll/cpl/desk/lang/de-DE.rc
+++ b/dll/cpl/desk/lang/de-DE.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Einstellungen"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Verschieben Sie die Monitor-Symbole, sodass sie der physischen Anordnung
Ihrer Monitore entsprechen.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Verschieben Sie die Monitor-Symbole, sodass sie der physischen Anordnung
Ihrer Monitore entsprechen.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Anzeige:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc
index 9e6e738a8e0..d098a341703 100644
--- a/dll/cpl/desk/lang/el-GR.rc
+++ b/dll/cpl/desk/lang/el-GR.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Ρυθμίσεις"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Σύρετε τα εικονίδια της οθόνης, ώστε να ταιριάξουν με τη φυσική διάταξη
των οθονών σας.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Σύρετε τα εικονίδια της οθόνης, ώστε να ταιριάξουν με τη φυσική διάταξη
των οθονών σας.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Εμφάνιση:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/en-GB.rc b/dll/cpl/desk/lang/en-GB.rc
index ff719d1e600..b7ebc3e5c0b 100644
--- a/dll/cpl/desk/lang/en-GB.rc
+++ b/dll/cpl/desk/lang/en-GB.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Display:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/en-US.rc b/dll/cpl/desk/lang/en-US.rc
index 36da4545952..6173558b086 100644
--- a/dll/cpl/desk/lang/en-US.rc
+++ b/dll/cpl/desk/lang/en-US.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Settings"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Display:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/es-ES.rc b/dll/cpl/desk/lang/es-ES.rc
index 4f5bf52ebd7..8f5c272af84 100644
--- a/dll/cpl/desk/lang/es-ES.rc
+++ b/dll/cpl/desk/lang/es-ES.rc
@@ -144,7 +144,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Configuración"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Arrastre los iconos para ajustar el orden físico de sus monitores.",
-1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Arrastre los iconos para ajustar el orden físico de sus monitores.",
IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "Mostrar:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/et-EE.rc b/dll/cpl/desk/lang/et-EE.rc
index a4b5d637dc8..978ccdf0ee8 100644
--- a/dll/cpl/desk/lang/et-EE.rc
+++ b/dll/cpl/desk/lang/et-EE.rc
@@ -141,7 +141,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Sätted"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Lohista monitori ikoone kuni see kattub teie füüsilise monitoride
järjekorraga.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Lohista monitori ikoone kuni see kattub teie füüsilise monitoride
järjekorraga.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Kuva:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc
index c0a1a0f0e24..45870b271a5 100644
--- a/dll/cpl/desk/lang/fr-FR.rc
+++ b/dll/cpl/desk/lang/fr-FR.rc
@@ -136,7 +136,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Paramètres"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Déplacez les icônes de moniteur pour qu'elles correspondent à
l'arrangement physique de vos moniteurs.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Déplacez les icônes de moniteur pour qu'elles correspondent à
l'arrangement physique de vos moniteurs.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Affichage :", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/he-IL.rc b/dll/cpl/desk/lang/he-IL.rc
index 6c91a9925b9..8fecbd9005b 100644
--- a/dll/cpl/desk/lang/he-IL.rc
+++ b/dll/cpl/desk/lang/he-IL.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "הגדרות"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "תצוגה:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc
index 73287ac3c7c..8f8f6ad8f26 100644
--- a/dll/cpl/desk/lang/hu-HU.rc
+++ b/dll/cpl/desk/lang/hu-HU.rc
@@ -136,7 +136,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Beállítások"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Mozgassa a monitor ikonokat úgy, hogy megegyezzen a monitorjai fizikai
elrendezésével.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Mozgassa a monitor ikonokat úgy, hogy megegyezzen a monitorjai fizikai
elrendezésével.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Képernyő:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/id-ID.rc b/dll/cpl/desk/lang/id-ID.rc
index f22885323d5..f0f339b1d31 100644
--- a/dll/cpl/desk/lang/id-ID.rc
+++ b/dll/cpl/desk/lang/id-ID.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Setelan"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Geser ikon monitor untuk mencocokkan penyesuaian fisik monitor.",
-1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Geser ikon monitor untuk mencocokkan penyesuaian fisik monitor.",
IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Tampilan:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc
index bc4cbf7884d..c648e8906be 100644
--- a/dll/cpl/desk/lang/it-IT.rc
+++ b/dll/cpl/desk/lang/it-IT.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Impostazioni"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Trascinare le icone dei monitor in modo corrispondente alla disposizione
fisica dei vostri monitor.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Trascinare le icone dei monitor in modo corrispondente alla disposizione
fisica dei vostri monitor.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Schermo:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc
index a9bbddde826..ae09152b14a 100644
--- a/dll/cpl/desk/lang/ja-JP.rc
+++ b/dll/cpl/desk/lang/ja-JP.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "設定"
FONT 9, "MS UI Gothic"
BEGIN
- LTEXT "モニタのアイコンを実際のモニタの配列と一致するように移動してください。", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "モニタのアイコンを実際のモニタの配列と一致するように移動してください。", IDC_SETTINGS_MONTEXT, 3, 3,
240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "ディスプレイ(&D):", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc
index 866e2667744..5021cf5f9bf 100644
--- a/dll/cpl/desk/lang/nl-NL.rc
+++ b/dll/cpl/desk/lang/nl-NL.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Instellingen"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Scherm:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/no-NO.rc b/dll/cpl/desk/lang/no-NO.rc
index 70985a7e200..f3d70cd2e29 100644
--- a/dll/cpl/desk/lang/no-NO.rc
+++ b/dll/cpl/desk/lang/no-NO.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Innstillinger"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Dra skjermikonene for å tilpasse fysisk til din skjerm.", -1, 3, 3,
240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Dra skjermikonene for å tilpasse fysisk til din skjerm.",
IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Skjerm:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc
index e244a797dc2..be19ad7fe59 100644
--- a/dll/cpl/desk/lang/pl-PL.rc
+++ b/dll/cpl/desk/lang/pl-PL.rc
@@ -144,7 +144,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Ustawienia"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Przeciągnij ikony monitorów tak, by przedstawiały fizyczne rozmieszczenie
twoich monitorów.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Przeciągnij ikony monitorów tak, by przedstawiały fizyczne rozmieszczenie
twoich monitorów.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Ekran:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/pt-BR.rc b/dll/cpl/desk/lang/pt-BR.rc
index a0977cf3180..6d10ed9df59 100644
--- a/dll/cpl/desk/lang/pt-BR.rc
+++ b/dll/cpl/desk/lang/pt-BR.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Configurações"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Arraste os ícones de monitor para que corresponda à disposição física de
seus monitores.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Arraste os ícones de monitor para que corresponda à disposição física de
seus monitores.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "Vídeo:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/pt-PT.rc b/dll/cpl/desk/lang/pt-PT.rc
index bcaccf7a445..7674e647081 100644
--- a/dll/cpl/desk/lang/pt-PT.rc
+++ b/dll/cpl/desk/lang/pt-PT.rc
@@ -139,7 +139,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Definições"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Arraste os ícones dos monitores, para que correspondam à disposição
física dos seus monitores.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Arraste os ícones dos monitores, para que correspondam à disposição
física dos seus monitores.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 250, 82, WS_EX_CLIENTEDGE
LTEXT "Monitor:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc
index 33b17bce241..511e4211091 100644
--- a/dll/cpl/desk/lang/ro-RO.rc
+++ b/dll/cpl/desk/lang/ro-RO.rc
@@ -139,7 +139,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Configurare"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Mișcați miniaturile ecranelor până vor corespunde cu amplasamentul fizic
al ecranelor (opțiune pentru ecrane multiple).", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Mișcați miniaturile ecranelor până vor corespunde cu amplasamentul fizic
al ecranelor (opțiune pentru ecrane multiple).", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Dispozitive de afișare:", 1820, 3, 107, 75, 9
diff --git a/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc
index 9115919059d..3cb754dc6ec 100644
--- a/dll/cpl/desk/lang/ru-RU.rc
+++ b/dll/cpl/desk/lang/ru-RU.rc
@@ -134,7 +134,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Параметры"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Разместите значки мониторов в соответствии с их расположением.", -1,
3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Разместите значки мониторов в соответствии с их расположением.",
IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Дисплей:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/sk-SK.rc b/dll/cpl/desk/lang/sk-SK.rc
index 82e4a3f4deb..b89182d311e 100644
--- a/dll/cpl/desk/lang/sk-SK.rc
+++ b/dll/cpl/desk/lang/sk-SK.rc
@@ -136,7 +136,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Nastavenie"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Ťahaním zoraďte ikony podľa fyzického rozmiestnenia monitorov.", -1,
3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Ťahaním zoraďte ikony podľa fyzického rozmiestnenia monitorov.",
IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Monitor:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/sq-AL.rc b/dll/cpl/desk/lang/sq-AL.rc
index b7ea4d62cb1..85fe079cc00 100644
--- a/dll/cpl/desk/lang/sq-AL.rc
+++ b/dll/cpl/desk/lang/sq-AL.rc
@@ -138,7 +138,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Cilësimet"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Terheq monitorimin e ikonave të përputhet me marrëveshje fizike të
vëzhguesit tuaj.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Terheq monitorimin e ikonave të përputhet me marrëveshje fizike të
vëzhguesit tuaj.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Ekran:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc
index eaf612f82df..a61fc851d18 100644
--- a/dll/cpl/desk/lang/sv-SE.rc
+++ b/dll/cpl/desk/lang/sv-SE.rc
@@ -136,7 +136,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Inställningar"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Drag the monitor icons to match the physical arrangement of your
monitors.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Bild:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/tr-TR.rc b/dll/cpl/desk/lang/tr-TR.rc
index b24b1233853..8ea90892be8 100644
--- a/dll/cpl/desk/lang/tr-TR.rc
+++ b/dll/cpl/desk/lang/tr-TR.rc
@@ -136,7 +136,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Ayarlar"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Monitörlerinizin fiziksel düzenlenmesini karşılaştırmak için monitör
simgelerini sürükleyiniz.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Monitörlerinizin fiziksel düzenlenmesini karşılaştırmak için monitör
simgelerini sürükleyiniz.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "Görü&ntü:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc
index 2d6ace664b2..5d8cbb06e11 100644
--- a/dll/cpl/desk/lang/uk-UA.rc
+++ b/dll/cpl/desk/lang/uk-UA.rc
@@ -142,7 +142,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Параметри"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "Розташуйте значки моніторів відповідно до фактичного розташування
моніторів.", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "Розташуйте значки моніторів відповідно до фактичного розташування
моніторів.", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "&Дисплей:", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/zh-CN.rc b/dll/cpl/desk/lang/zh-CN.rc
index f37e554a854..76cd85d2a65 100644
--- a/dll/cpl/desk/lang/zh-CN.rc
+++ b/dll/cpl/desk/lang/zh-CN.rc
@@ -144,7 +144,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "设置"
FONT 9, "宋体"
BEGIN
- LTEXT "拖动监视器图标以匹配监视器的物理排列。", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "拖动监视器图标以匹配监视器的物理排列。", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "显示(&D):", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/zh-HK.rc b/dll/cpl/desk/lang/zh-HK.rc
index 005e4c63122..e6d8ee0bbea 100644
--- a/dll/cpl/desk/lang/zh-HK.rc
+++ b/dll/cpl/desk/lang/zh-HK.rc
@@ -142,7 +142,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "設定"
FONT 9, "新細明體"
BEGIN
- LTEXT "拖動顯示器圖示以便符合顯示器的實際設定。", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "拖動顯示器圖示以便符合顯示器的實際設定。", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "顯示(&D):", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/lang/zh-TW.rc b/dll/cpl/desk/lang/zh-TW.rc
index ef0f5a2a315..81a5f965abc 100644
--- a/dll/cpl/desk/lang/zh-TW.rc
+++ b/dll/cpl/desk/lang/zh-TW.rc
@@ -143,7 +143,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "設定"
FONT 9, "新細明體"
BEGIN
- LTEXT "拖動顯示器圖示以便符合顯示器的實際設定。", -1, 3, 3, 240, 20
+ CONTROL "", IDC_RESOLUTION_PREVIEW, "Static", SS_OWNERDRAW, 70,
10, 105, 74, 0
+ LTEXT "拖動顯示器圖示以便符合顯示器的實際設定。", IDC_SETTINGS_MONTEXT, 3, 3, 240, 20
CONTROL "", IDC_SETTINGS_MONSEL, "MONITORSELWNDCLASS", WS_CHILD |
WS_VISIBLE |
WS_TABSTOP, 3, 23, 240, 82, WS_EX_CLIENTEDGE
LTEXT "顯示(&D):", 1820, 3, 107, 70, 9
diff --git a/dll/cpl/desk/resource.h b/dll/cpl/desk/resource.h
index 4e754afd061..7d9ed465b76 100644
--- a/dll/cpl/desk/resource.h
+++ b/dll/cpl/desk/resource.h
@@ -31,6 +31,7 @@
#define IDC_COLOR_BUTTON 1004
#define IDC_PLACEMENT_COMBO 1005
#define IDS_BACKGROUND_COMDLG_FILTER 1006
+#define IDC_RESOLUTION_PREVIEW 1007
/* Screensaver Page */
#define IDC_SCREENS_PREVIEW 1010
@@ -65,10 +66,11 @@
#define IDC_SETTINGS_ADVANCED 205
#define IDC_SETTINGS_MONSEL 206
#define IDC_SETTINGS_SPECTRUM 207
+#define IDC_SETTINGS_MONTEXT 208
-#define IDB_SPECTRUM_4 208
-#define IDB_SPECTRUM_8 209
-#define IDB_SPECTRUM_16 210
+#define IDB_SPECTRUM_4 209
+#define IDB_SPECTRUM_8 210
+#define IDB_SPECTRUM_16 211
#define IDR_PREVIEW_MENU 2100
#define ID_MENU_NORMAL 2101
diff --git a/dll/cpl/desk/settings.c b/dll/cpl/desk/settings.c
index b161214fd69..8784f4a9743 100644
--- a/dll/cpl/desk/settings.c
+++ b/dll/cpl/desk/settings.c
@@ -360,6 +360,9 @@ SettingsOnInitDialog(IN HWND hwndDlg)
/* Single video adapter */
OnDisplayDeviceChanged(hwndDlg, pData, pData->DisplayDeviceList);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_MONTEXT), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_MONSEL), SW_HIDE);
+
monitors.Position.x = monitors.Position.y = 0;
monitors.Size.cx =
pData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth;
monitors.Size.cy =
pData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight;
@@ -377,6 +380,8 @@ SettingsOnInitDialog(IN HWND hwndDlg)
OnDisplayDeviceChanged(hwndDlg, pData, pData->DisplayDeviceList);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_RESOLUTION_PREVIEW), SW_HIDE);
+
pMonitors = (PMONSL_MONINFO)HeapAlloc(GetProcessHeap(), 0, sizeof(MONSL_MONINFO)
* Result);
if (pMonitors)
{
@@ -421,6 +426,40 @@ SettingsOnInitDialog(IN HWND hwndDlg)
}
}
+static VOID
+ShowResolutionPreview(IN LPDRAWITEMSTRUCT draw, IN PSETTINGS_DATA pData)
+{
+ HBRUSH hBrush;
+ HDC hDC;
+ HGDIOBJ hOldObj;
+ RECT rcItem = {
+ MONITOR_LEFT,
+ MONITOR_TOP,
+ MONITOR_RIGHT,
+ MONITOR_BOTTOM
+ };
+
+ hDC = CreateCompatibleDC(draw->hDC);
+ hOldObj = SelectObject(hDC, g_GlobalData.hMonitorBitmap);
+
+ /* FIXME: Draw resolution preview bitmap inside monitor. */
+ hBrush = CreateSolidBrush(g_GlobalData.desktop_color);
+ FillRect(hDC, &rcItem, hBrush);
+ DeleteObject(hBrush);
+
+ GdiTransparentBlt(draw->hDC,
+ draw->rcItem.left, draw->rcItem.top,
+ draw->rcItem.right - draw->rcItem.left + 1,
+ draw->rcItem.bottom - draw->rcItem.top + 1,
+ hDC,
+ 0, 0,
+ g_GlobalData.bmMonWidth, g_GlobalData.bmMonHeight,
+ MONITOR_ALPHA);
+
+ SelectObject(hDC, hOldObj);
+ DeleteDC(hDC);
+}
+
/* Get the ID for SETTINGS_DATA::hSpectrumBitmaps */
static VOID
ShowColorSpectrum(IN HDC hDC, IN LPRECT client, IN DWORD BitsPerPel, IN PSETTINGS_DATA
pData)
@@ -576,6 +615,7 @@ OnResolutionChanged(IN HWND hwndDlg, IN PSETTINGS_DATA pData, IN DWORD
NewPositi
}
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ InvalidateRect(GetDlgItem(hwndDlg, IDC_RESOLUTION_PREVIEW), NULL, TRUE);
dmBitsPerPel = Current->dmBitsPerPel;
dmDisplayFrequency = Current->dmDisplayFrequency;
@@ -854,8 +894,19 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN
LPARAM lPar
LPDRAWITEMSTRUCT lpDrawItem;
lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
- if (lpDrawItem->CtlID == IDC_SETTINGS_SPECTRUM)
- ShowColorSpectrum(lpDrawItem->hDC, &lpDrawItem->rcItem,
pData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel, pData);
+ switch (lpDrawItem->CtlID)
+ {
+ case IDC_RESOLUTION_PREVIEW:
+ {
+ ShowResolutionPreview(lpDrawItem, pData);
+ break;
+ }
+ case IDC_SETTINGS_SPECTRUM:
+ {
+ ShowColorSpectrum(lpDrawItem->hDC, &lpDrawItem->rcItem,
pData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel, pData);
+ break;
+ }
+ }
break;
}
case WM_COMMAND: