Author: gedmurphy
Date: Fri Apr 21 02:25:53 2006
New Revision: 21678
URL:
http://svn.reactos.ru/svn/reactos?rev=21678&view=rev
Log:
Add the same bitmap to the settings page too.
Needs the background masking out though ...
Modified:
trunk/reactos/dll/cpl/desk/background.c
trunk/reactos/dll/cpl/desk/settings.c
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:25:53 2006
@@ -43,8 +43,8 @@
HIMAGELIST g_hShellImageList = NULL;
-HBITMAP hBitmap = NULL;
-int cxSource, cySource;
+static HBITMAP hBitmap = NULL;
+static int cxSource, cySource;
/* Add the images in the C:\ReactOS directory and the current wallpaper if any */
void AddListViewItems()
Modified: trunk/reactos/dll/cpl/desk/settings.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/settings.c (original)
+++ trunk/reactos/dll/cpl/desk/settings.c Fri Apr 21 02:25:53 2006
@@ -44,6 +44,9 @@
static PDISPLAY_DEVICE_ENTRY DisplayDeviceList = NULL;
static PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice = NULL;
+
+HBITMAP hBitmap = NULL;
+int cxSource, cySource;
static VOID
UpdateDisplay(IN HWND hwndDlg)
@@ -261,6 +264,7 @@
DWORD Result = 0;
DWORD iDevNum = 0;
DISPLAY_DEVICE displayDevice;
+ BITMAP bitmap;
/* Get video cards list */
displayDevice.cb = (DWORD)sizeof(DISPLAY_DEVICE);
@@ -292,6 +296,15 @@
/* FIXME: multi video adapter */
/* FIXME: choose selected adapter being the primary one */
}
+
+ 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;
+ }
}
static VOID
@@ -555,6 +568,24 @@
}
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_DESTROY:
{
PDISPLAY_DEVICE_ENTRY Current = DisplayDeviceList;
@@ -571,6 +602,8 @@
HeapFree(GetProcessHeap(), 0, Current);
Current = Next;
}
+
+ DeleteObject(hBitmap);
}
}
return FALSE;