Author: gedmurphy
Date: Fri Apr 21 02:18:12 2006
New Revision: 21677
URL:
http://svn.reactos.ru/svn/reactos?rev=21677&view=rev
Log:
Display a monitor behind the background picker on the display control panel.
Other languages needs their resources updating so it doesn't look messy. No time to do
it, it's too late ;)
Added:
trunk/reactos/dll/cpl/desk/resources/monitor.bmp (with props)
Modified:
trunk/reactos/dll/cpl/desk/background.c
trunk/reactos/dll/cpl/desk/desk.rc
trunk/reactos/dll/cpl/desk/en.rc
trunk/reactos/dll/cpl/desk/resource.h
Modified: trunk/reactos/dll/cpl/desk/background.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/desk/background.c (original)
+++ trunk/reactos/dll/cpl/desk/background.c Fri Apr 21 02:18:12 2006
@@ -42,6 +42,9 @@
HWND g_hColorButton = NULL;
HIMAGELIST g_hShellImageList = NULL;
+
+HBITMAP hBitmap = NULL;
+int cxSource, cySource;
/* Add the images in the C:\ReactOS directory and the current wallpaper if any */
void AddListViewItems()
@@ -226,6 +229,7 @@
DWORD bufferSize = sizeof(szBuffer);
DWORD varType = REG_SZ;
LONG result;
+ BITMAP bitmap;
g_hBackgroundList = GetDlgItem(g_hBackgroundPage, IDC_BACKGROUND_LIST);
g_hBackgroundPreview = GetDlgItem(g_hBackgroundPage, IDC_BACKGROUND_PREVIEW);
@@ -280,6 +284,15 @@
}
RegCloseKey(regKey);
+
+ hBitmap = LoadImage(hApplet, MAKEINTRESOURCE(IDC_MONITOR), IMAGE_BITMAP, 0, 0,
LR_LOADTRANSPARENT);
+ if (hBitmap != NULL)
+ {
+ GetObject(hBitmap, sizeof(BITMAP), &bitmap);
+
+ cxSource = bitmap.bmWidth;
+ cySource = bitmap.bmHeight;
+ }
}
void OnColorButton()
@@ -569,6 +582,23 @@
}
} break;
+ case WM_PAINT:
+ {
+ PAINTSTRUCT ps;
+ HDC hdc, hdcMem;
+
+ hdc = BeginPaint(hwndDlg, &ps);
+
+ hdcMem = CreateCompatibleDC(hdc);
+ SelectObject(hdcMem, hBitmap);
+
+ BitBlt(hdc, 98, 0, cxSource, cySource, hdcMem, 0, 0, SRCCOPY);
+
+ DeleteDC(hdcMem);
+ EndPaint(hwndDlg, &ps);
+
+ } break;
+
case WM_DRAWITEM:
{
LPDRAWITEMSTRUCT drawItem;
@@ -616,6 +646,8 @@
if(g_pWallpaperBitmap != NULL)
DibFreeImage(g_pWallpaperBitmap);
+ DeleteObject(hBitmap);
+
} break;
}
Modified: trunk/reactos/dll/cpl/desk/desk.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/desk.rc?rev=21…
==============================================================================
--- trunk/reactos/dll/cpl/desk/desk.rc (original)
+++ trunk/reactos/dll/cpl/desk/desk.rc Fri Apr 21 02:18:12 2006
@@ -11,6 +11,7 @@
#include <reactos/version.rc>
IDC_DESK_ICON ICON "resources/applet.ico"
+IDC_MONITOR BITMAP "resources/monitor.bmp"
#include "en.rc"
#include "cz.rc"
Modified: trunk/reactos/dll/cpl/desk/en.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/en.rc?rev=2167…
==============================================================================
--- trunk/reactos/dll/cpl/desk/en.rc (original)
+++ trunk/reactos/dll/cpl/desk/en.rc Fri Apr 21 02:18:12 2006
@@ -1,22 +1,18 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 188
+IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 205
STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Background"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL
"",IDC_BACKGROUND_PREVIEW,"Static",SS_OWNERDRAW,78,10,
- 90,65,WS_EX_STATICEDGE
- CONTROL "",IDC_BACKGROUND_LIST,"SysListView32",LVS_REPORT
|
- LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS |
- WS_BORDER | WS_TABSTOP,7,99,173,71
- LTEXT "Select an image to use as your desktop wallpaper:",
- IDC_STATIC,8,87,180,8
- PUSHBUTTON "&Browse...",IDC_BROWSE_BUTTON,187,135,50,14
- PUSHBUTTON "&Color...",IDC_COLOR_BUTTON,187,155,50,14
- LTEXT "Placement:",IDC_STATIC,187,98,36,8
- COMBOBOX IDC_PLACEMENT_COMBO,187,108,50,90,CBS_DROPDOWNLIST |
- CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "", IDC_BACKGROUND_PREVIEW, "Static",
SS_OWNERDRAW, 80, 10, 83, 57, WS_EX_STATICEDGE
+ CONTROL "",IDC_BACKGROUND_LIST,"SysListView32",LVS_REPORT
| LVS_SINGLESEL | LVS_NOCOLUMNHEADER
+ | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 8, 114, 174, 78
+ LTEXT "Select an image to use as your desktop wallpaper:",
IDC_STATIC, 8, 103, 180, 9
+ PUSHBUTTON "&Browse...", IDC_BROWSE_BUTTON, 188, 114, 50, 15
+ PUSHBUTTON "&Color...", IDC_COLOR_BUTTON, 188, 177, 50, 15
+ LTEXT "Placement:", IDC_STATIC, 188, 138, 36, 9
+ COMBOBOX IDC_PLACEMENT_COMBO, 188, 149, 50, 54, CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
END
IDD_SCREENSAVER DIALOGEX DISCARDABLE 0, 0, 246, 188
Modified: trunk/reactos/dll/cpl/desk/resource.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/resource.h?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/resource.h (original)
+++ trunk/reactos/dll/cpl/desk/resource.h Fri Apr 21 02:18:12 2006
@@ -25,12 +25,14 @@
/* Background Page */
#define IDC_BACKGROUND_LIST 1000
-#define IDC_BACKGROUND_PREVIEW 1001
-#define IDC_BROWSE_BUTTON 1002
-#define IDC_COLOR_BUTTON 1003
-#define IDC_PLACEMENT_COMBO 1004
-#define IDS_BACKGROUND_COMDLG_FILTER 1005
-#define IDS_SUPPORTED_EXT 1006
+#define IDC_MONITOR 1001
+#define IDC_BACKGROUND_PREVIEW 1002
+#define IDC_BROWSE_BUTTON 1003
+#define IDC_COLOR_BUTTON 1004
+#define IDC_PLACEMENT_COMBO 1005
+#define IDS_BACKGROUND_COMDLG_FILTER 1006
+#define IDS_SUPPORTED_EXT 1007
+
/* Screensaver Page */
#define IDC_SCREENS_CHOICES 1010
Added: trunk/reactos/dll/cpl/desk/resources/monitor.bmp
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/resources/moni…
==============================================================================
Binary file - no diff available.
Propchange: trunk/reactos/dll/cpl/desk/resources/monitor.bmp
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream