https://git.reactos.org/?p=reactos.git;a=commitdiff;h=092fc8edd0c8895e361a3…
commit 092fc8edd0c8895e361a3dda5d90f185a1145ac8
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Mon Oct 3 17:32:42 2022 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Tue Oct 4 21:16:07 2022 +0300
[DESK] Show screensaver preview in a monitor
Reuse the same monitor bitmap for the top preview control.
Also use Windows-compatible class name for it.
CORE-10606
---
dll/cpl/desk/lang/bg-BG.rc | 2 +-
dll/cpl/desk/lang/cs-CZ.rc | 2 +-
dll/cpl/desk/lang/de-DE.rc | 2 +-
dll/cpl/desk/lang/el-GR.rc | 2 +-
dll/cpl/desk/lang/en-GB.rc | 2 +-
dll/cpl/desk/lang/en-US.rc | 2 +-
dll/cpl/desk/lang/es-ES.rc | 2 +-
dll/cpl/desk/lang/et-EE.rc | 2 +-
dll/cpl/desk/lang/fr-FR.rc | 2 +-
dll/cpl/desk/lang/he-IL.rc | 2 +-
dll/cpl/desk/lang/hu-HU.rc | 2 +-
dll/cpl/desk/lang/id-ID.rc | 2 +-
dll/cpl/desk/lang/it-IT.rc | 2 +-
dll/cpl/desk/lang/ja-JP.rc | 2 +-
dll/cpl/desk/lang/nl-NL.rc | 2 +-
dll/cpl/desk/lang/no-NO.rc | 2 +-
dll/cpl/desk/lang/pl-PL.rc | 2 +-
dll/cpl/desk/lang/pt-BR.rc | 2 +-
dll/cpl/desk/lang/pt-PT.rc | 2 +-
dll/cpl/desk/lang/ro-RO.rc | 2 +-
dll/cpl/desk/lang/ru-RU.rc | 2 +-
dll/cpl/desk/lang/sk-SK.rc | 2 +-
dll/cpl/desk/lang/sq-AL.rc | 2 +-
dll/cpl/desk/lang/sv-SE.rc | 2 +-
dll/cpl/desk/lang/tr-TR.rc | 2 +-
dll/cpl/desk/lang/uk-UA.rc | 2 +-
dll/cpl/desk/lang/zh-CN.rc | 2 +-
dll/cpl/desk/lang/zh-HK.rc | 2 +-
dll/cpl/desk/lang/zh-TW.rc | 2 +-
dll/cpl/desk/screensaver.c | 89 +++++++++++++++++++++++++++++++++++++++++++++-
30 files changed, 117 insertions(+), 30 deletions(-)
diff --git a/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc
index b742bfd45b1..4dae3f7b9ae 100644
--- a/dll/cpl/desk/lang/bg-BG.rc
+++ b/dll/cpl/desk/lang/bg-BG.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Екранен предпазител"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Екранен предпазител", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "На&стройки", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc
index 386411e122d..9d083f1936e 100644
--- a/dll/cpl/desk/lang/cs-CZ.rc
+++ b/dll/cpl/desk/lang/cs-CZ.rc
@@ -39,7 +39,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Spořič obrazovky"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Spořič obrazovky", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Nastavení", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc
index d83f0b84916..ddf5cb6ed79 100644
--- a/dll/cpl/desk/lang/de-DE.rc
+++ b/dll/cpl/desk/lang/de-DE.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Bildschirmschoner"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Bild&schirmschoner", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Eins&tellungen", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc
index c3a5444845e..6678325805b 100644
--- a/dll/cpl/desk/lang/el-GR.rc
+++ b/dll/cpl/desk/lang/el-GR.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Προφύλαξη οθόνης"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Προφύλαξη οθόνης", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Ρυθμίσεις", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP
diff --git a/dll/cpl/desk/lang/en-GB.rc b/dll/cpl/desk/lang/en-GB.rc
index d0fc9282a17..11609378370 100644
--- a/dll/cpl/desk/lang/en-GB.rc
+++ b/dll/cpl/desk/lang/en-GB.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Screensaver"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Se&ttings", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/en-US.rc b/dll/cpl/desk/lang/en-US.rc
index 12cc26ce914..2de5355fc14 100644
--- a/dll/cpl/desk/lang/en-US.rc
+++ b/dll/cpl/desk/lang/en-US.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Screensaver"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Se&ttings", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/es-ES.rc b/dll/cpl/desk/lang/es-ES.rc
index 21ce9e4fe2c..244ec1931f4 100644
--- a/dll/cpl/desk/lang/es-ES.rc
+++ b/dll/cpl/desk/lang/es-ES.rc
@@ -43,7 +43,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Protector de pantalla"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Protector de pantalla ", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "C&onfiguración", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/et-EE.rc b/dll/cpl/desk/lang/et-EE.rc
index 4436b9c0b73..74b1198e85b 100644
--- a/dll/cpl/desk/lang/et-EE.rc
+++ b/dll/cpl/desk/lang/et-EE.rc
@@ -40,7 +40,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Ekraanisäästja"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Erkaanisäästja", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "S&ätted", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP
diff --git a/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc
index 9f8a90e1e0b..1cf8f9868c1 100644
--- a/dll/cpl/desk/lang/fr-FR.rc
+++ b/dll/cpl/desk/lang/fr-FR.rc
@@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Écran de veille"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "É&cran de veille", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Paramè&tres", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/he-IL.rc b/dll/cpl/desk/lang/he-IL.rc
index e5b4c511655..60e1156616d 100644
--- a/dll/cpl/desk/lang/he-IL.rc
+++ b/dll/cpl/desk/lang/he-IL.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "שומר מסך"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "שומר מסך", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "הגדרות", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP
diff --git a/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc
index f96f7c872c6..1f3d1b70309 100644
--- a/dll/cpl/desk/lang/hu-HU.rc
+++ b/dll/cpl/desk/lang/hu-HU.rc
@@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Képernyőkímélő"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Képernyőkímélő", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Beállítások", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/id-ID.rc b/dll/cpl/desk/lang/id-ID.rc
index a2f0a2fe2dc..5e85b95bbca 100644
--- a/dll/cpl/desk/lang/id-ID.rc
+++ b/dll/cpl/desk/lang/id-ID.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Screensaver"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Se&telan", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc
index d66cf49191d..e96ec2d79d6 100644
--- a/dll/cpl/desk/lang/it-IT.rc
+++ b/dll/cpl/desk/lang/it-IT.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Salva schermo"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Salva schermo", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Impostazioni", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc
index 432b61a7fef..e98ce8bca89 100644
--- a/dll/cpl/desk/lang/ja-JP.rc
+++ b/dll/cpl/desk/lang/ja-JP.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "スクリーン セーバー"
FONT 9, "MS UI Gothic", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "スクリーン セーバー(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "設定(&T)", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP
diff --git a/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc
index fca749f8c8f..6487d1ee77e 100644
--- a/dll/cpl/desk/lang/nl-NL.rc
+++ b/dll/cpl/desk/lang/nl-NL.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Schermbeveiliging"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Schermbeveiliging", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Instellingen", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/no-NO.rc b/dll/cpl/desk/lang/no-NO.rc
index d6520cb9f0c..9fa117f234e 100644
--- a/dll/cpl/desk/lang/no-NO.rc
+++ b/dll/cpl/desk/lang/no-NO.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Skjermsparer"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Skjermsparer", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Inn&stillinger", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc
index e88a01a9988..8409da7729a 100644
--- a/dll/cpl/desk/lang/pl-PL.rc
+++ b/dll/cpl/desk/lang/pl-PL.rc
@@ -43,7 +43,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Wygaszacz ekranu"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Wygaszacz ekranu", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Ustawienia", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/pt-BR.rc b/dll/cpl/desk/lang/pt-BR.rc
index 2a524c8c992..ea7bbfcc074 100644
--- a/dll/cpl/desk/lang/pt-BR.rc
+++ b/dll/cpl/desk/lang/pt-BR.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Proteção de tela"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Proteção de &tela", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Configurações", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/pt-PT.rc b/dll/cpl/desk/lang/pt-PT.rc
index 2c93d48cbbf..5275419926f 100644
--- a/dll/cpl/desk/lang/pt-PT.rc
+++ b/dll/cpl/desk/lang/pt-PT.rc
@@ -38,7 +38,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Protecção de ecrã"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Protecção de &ecrã", IDC_SCREENS_DUMMY, 8, 92, 230, 64
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Definições", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc
index bf87ce2334d..a6655c12562 100644
--- a/dll/cpl/desk/lang/ro-RO.rc
+++ b/dll/cpl/desk/lang/ro-RO.rc
@@ -38,7 +38,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Regim de inactivitate"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Ani&mație de ecran inactiv", IDC_SCREENS_DUMMY, 8, 92, 230,
52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Opțiuni", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc
index c48b93a8c78..afe0555ac7f 100644
--- a/dll/cpl/desk/lang/ru-RU.rc
+++ b/dll/cpl/desk/lang/ru-RU.rc
@@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Заставка"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Заставка", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Параметры", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/sk-SK.rc b/dll/cpl/desk/lang/sk-SK.rc
index fd458e45db3..ce7e673f425 100644
--- a/dll/cpl/desk/lang/sk-SK.rc
+++ b/dll/cpl/desk/lang/sk-SK.rc
@@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Šetrič obrazovky"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Šetrič o&brazovky", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Nastavenie", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/sq-AL.rc b/dll/cpl/desk/lang/sq-AL.rc
index b6b504e1e49..5722554caab 100644
--- a/dll/cpl/desk/lang/sq-AL.rc
+++ b/dll/cpl/desk/lang/sq-AL.rc
@@ -37,7 +37,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Screensaver"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Cilësime&t", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc
index 409fc3f491b..2533296827e 100644
--- a/dll/cpl/desk/lang/sv-SE.rc
+++ b/dll/cpl/desk/lang/sv-SE.rc
@@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Screensaver"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Se&ttings", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/tr-TR.rc b/dll/cpl/desk/lang/tr-TR.rc
index c828f0b5cb9..759472c8f13 100644
--- a/dll/cpl/desk/lang/tr-TR.rc
+++ b/dll/cpl/desk/lang/tr-TR.rc
@@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Ekran Koruyucu"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "Ekran Koruyucu", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Ayarlar", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc
index 5e9d3a285e2..4343a9ad45d 100644
--- a/dll/cpl/desk/lang/uk-UA.rc
+++ b/dll/cpl/desk/lang/uk-UA.rc
@@ -41,7 +41,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Заставка"
FONT 8, "MS Shell Dlg", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "&Заставка", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "П&араметри", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/zh-CN.rc b/dll/cpl/desk/lang/zh-CN.rc
index a9a51d7d598..df8d1e8ab74 100644
--- a/dll/cpl/desk/lang/zh-CN.rc
+++ b/dll/cpl/desk/lang/zh-CN.rc
@@ -43,7 +43,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "屏幕保护程序"
FONT 9, "宋体", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "屏幕保护程序(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "设置(&T)...", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/zh-HK.rc b/dll/cpl/desk/lang/zh-HK.rc
index 2e42c33b408..62fa240f8c1 100644
--- a/dll/cpl/desk/lang/zh-HK.rc
+++ b/dll/cpl/desk/lang/zh-HK.rc
@@ -41,7 +41,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "螢幕保護裝置"
FONT 9, "新細明體", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "螢幕保護裝置(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "設定(&T)...", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/lang/zh-TW.rc b/dll/cpl/desk/lang/zh-TW.rc
index 2f8a659304c..8f08fefd871 100644
--- a/dll/cpl/desk/lang/zh-TW.rc
+++ b/dll/cpl/desk/lang/zh-TW.rc
@@ -42,7 +42,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "螢幕保護裝置"
FONT 9, "新細明體", 0, 0
BEGIN
- CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 70, WS_EX_STATICEDGE
+ CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10,
105, 74
GROUPBOX "螢幕保護裝置(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52
COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "設定(&T)...", IDC_SCREENS_SETTINGS, 120, 102, 50, 15,
WS_GROUP
diff --git a/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c
index 02c05c9b650..f4b81612ca3 100644
--- a/dll/cpl/desk/screensaver.c
+++ b/dll/cpl/desk/screensaver.c
@@ -12,6 +12,8 @@
#define MAX_SCREENSAVERS 100
+static const TCHAR szPreviewWndClass[] = TEXT("SSDemoParent");
+
typedef struct
{
BOOL bIsScreenSaver; /* Is this background a wallpaper */
@@ -26,6 +28,7 @@ typedef struct _DATA
PROCESS_INFORMATION PrevWindowPi;
int Selection;
UINT ScreenSaverCount;
+ HWND ScreenSaverPreviewParent;
} DATA, *PDATA;
@@ -104,10 +107,48 @@ SelectionChanged(HWND hwndDlg, PDATA pData)
}
+static VOID
+ShowScreenSaverPreview(IN LPDRAWITEMSTRUCT draw, IN PDATA 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);
+
+ if (!IsWindowVisible(pData->ScreenSaverPreviewParent))
+ {
+ /* FIXME: Draw static 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);
+}
+
+
static VOID
SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData)
{
- HWND hPreview = GetDlgItem(hwndDlg, IDC_SCREENS_PREVIEW);
+ HWND hPreview = pData->ScreenSaverPreviewParent;
STARTUPINFO si;
TCHAR szCmdline[2048];
@@ -119,6 +160,7 @@ SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData)
CloseHandle(pData->PrevWindowPi.hThread);
pData->PrevWindowPi.hThread = pData->PrevWindowPi.hProcess = NULL;
}
+ ShowWindow(pData->ScreenSaverPreviewParent, SW_HIDE);
if (pData->Selection > 0)
{
@@ -131,6 +173,8 @@ SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData)
si.cb = sizeof(si);
ZeroMemory(&pData->PrevWindowPi, sizeof(pData->PrevWindowPi));
+ ShowWindow(pData->ScreenSaverPreviewParent, SW_SHOW);
+
if (!CreateProcess(NULL,
szCmdline,
NULL,
@@ -584,6 +628,7 @@ OnInitDialog(HWND hwndDlg, PDATA pData)
LPTSTR lpCurSs;
HWND hwndSSCombo = GetDlgItem(hwndDlg, IDC_SCREENS_LIST);
INT Num;
+ WNDCLASS wc = {0};
pData = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
@@ -594,6 +639,32 @@ OnInitDialog(HWND hwndDlg, PDATA pData)
return FALSE;
}
+ wc.lpfnWndProc = DefWindowProc;
+ wc.hInstance = hApplet;
+ wc.hCursor = NULL;
+ wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
+ wc.lpszClassName = szPreviewWndClass;
+
+ if (RegisterClass(&wc))
+ {
+ HWND hParent = GetDlgItem(hwndDlg, IDC_SCREENS_PREVIEW);
+ HWND hChild;
+
+ hChild = CreateWindowEx(0, szPreviewWndClass, NULL,
+ WS_CHILD, 0, 0, 0, 0, hParent,
+ NULL, hApplet, NULL);
+ if (hChild != NULL)
+ {
+ RECT rc;
+ GetClientRect(hParent, &rc);
+ rc.left += MONITOR_LEFT;
+ rc.top += MONITOR_TOP;
+ MoveWindow(hChild, rc.left, rc.top, MONITOR_WIDTH, MONITOR_HEIGHT, FALSE);
+ }
+
+ pData->ScreenSaverPreviewParent = hChild;
+ }
+
SetWindowLongPtr(hwndDlg,
DWLP_USER,
(LONG_PTR)pData);
@@ -708,6 +779,12 @@ ScreenSaverPageProc(HWND hwndDlg,
case WM_DESTROY:
{
+ if (pData->ScreenSaverPreviewParent)
+ {
+ DestroyWindow(pData->ScreenSaverPreviewParent);
+ pData->ScreenSaverPreviewParent = NULL;
+ }
+ UnregisterClass(szPreviewWndClass, hApplet);
if (pData->PrevWindowPi.hProcess)
{
TerminateProcess(pData->PrevWindowPi.hProcess, 0);
@@ -727,6 +804,16 @@ ScreenSaverPageProc(HWND hwndDlg,
break;
}
+ case WM_DRAWITEM:
+ {
+ LPDRAWITEMSTRUCT lpDrawItem;
+ lpDrawItem = (LPDRAWITEMSTRUCT)lParam;
+
+ if (lpDrawItem->CtlID == IDC_SCREENS_PREVIEW)
+ ShowScreenSaverPreview(lpDrawItem, pData);
+ break;
+ }
+
case WM_COMMAND:
{
DWORD controlId = LOWORD(wParam);