[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
This commit is contained in:
Stanislav Motylkov 2022-10-03 17:32:42 +03:00
parent d5bd08fca4
commit 092fc8edd0
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
30 changed files with 117 additions and 30 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);