mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
Add the same bitmap to the settings page too.
Needs the background masking out though ... svn path=/trunk/; revision=21678
This commit is contained in:
parent
fbf34c7981
commit
6f15819ed2
|
@ -43,8 +43,8 @@ HWND g_hColorButton = NULL;
|
||||||
|
|
||||||
HIMAGELIST g_hShellImageList = NULL;
|
HIMAGELIST g_hShellImageList = NULL;
|
||||||
|
|
||||||
HBITMAP hBitmap = NULL;
|
static HBITMAP hBitmap = NULL;
|
||||||
int cxSource, cySource;
|
static int cxSource, cySource;
|
||||||
|
|
||||||
/* Add the images in the C:\ReactOS directory and the current wallpaper if any */
|
/* Add the images in the C:\ReactOS directory and the current wallpaper if any */
|
||||||
void AddListViewItems()
|
void AddListViewItems()
|
||||||
|
|
|
@ -45,6 +45,9 @@ typedef struct _DISPLAY_DEVICE_ENTRY
|
||||||
static PDISPLAY_DEVICE_ENTRY DisplayDeviceList = NULL;
|
static PDISPLAY_DEVICE_ENTRY DisplayDeviceList = NULL;
|
||||||
static PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice = NULL;
|
static PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice = NULL;
|
||||||
|
|
||||||
|
HBITMAP hBitmap = NULL;
|
||||||
|
int cxSource, cySource;
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
UpdateDisplay(IN HWND hwndDlg)
|
UpdateDisplay(IN HWND hwndDlg)
|
||||||
{
|
{
|
||||||
|
@ -261,6 +264,7 @@ OnInitDialog(IN HWND hwndDlg)
|
||||||
DWORD Result = 0;
|
DWORD Result = 0;
|
||||||
DWORD iDevNum = 0;
|
DWORD iDevNum = 0;
|
||||||
DISPLAY_DEVICE displayDevice;
|
DISPLAY_DEVICE displayDevice;
|
||||||
|
BITMAP bitmap;
|
||||||
|
|
||||||
/* Get video cards list */
|
/* Get video cards list */
|
||||||
displayDevice.cb = (DWORD)sizeof(DISPLAY_DEVICE);
|
displayDevice.cb = (DWORD)sizeof(DISPLAY_DEVICE);
|
||||||
|
@ -292,6 +296,15 @@ OnInitDialog(IN HWND hwndDlg)
|
||||||
/* FIXME: multi video adapter */
|
/* FIXME: multi video adapter */
|
||||||
/* FIXME: choose selected adapter being the primary one */
|
/* 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
|
static VOID
|
||||||
|
@ -555,6 +568,24 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case WM_DESTROY:
|
||||||
{
|
{
|
||||||
PDISPLAY_DEVICE_ENTRY Current = DisplayDeviceList;
|
PDISPLAY_DEVICE_ENTRY Current = DisplayDeviceList;
|
||||||
|
@ -571,6 +602,8 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar
|
||||||
HeapFree(GetProcessHeap(), 0, Current);
|
HeapFree(GetProcessHeap(), 0, Current);
|
||||||
Current = Next;
|
Current = Next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeleteObject(hBitmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue