mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
Desktop should handle WM_ERASEBKGND.
svn path=/trunk/; revision=6997
This commit is contained in:
parent
b0848526af
commit
a7d4741918
1 changed files with 27 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: desktopbg.c,v 1.1 2003/12/07 23:02:57 gvg Exp $
|
/* $Id: desktopbg.c,v 1.2 2003/12/13 16:04:36 navaraf Exp $
|
||||||
*
|
*
|
||||||
* reactos/subsys/csrss/win32csr/desktopbg.c
|
* reactos/subsys/csrss/win32csr/desktopbg.c
|
||||||
*
|
*
|
||||||
|
@ -33,12 +33,20 @@ typedef struct tagDTBG_THREAD_DATA
|
||||||
|
|
||||||
static BOOL Initialized = FALSE;
|
static BOOL Initialized = FALSE;
|
||||||
|
|
||||||
|
static void FASTCALL
|
||||||
|
DtbgPaint(HDC hDC, LPRECT lpRect)
|
||||||
|
{
|
||||||
|
HBRUSH DesktopBrush;
|
||||||
|
|
||||||
|
DesktopBrush = CreateSolidBrush(RGB(58, 110, 165));
|
||||||
|
FillRect(hDC, lpRect, DesktopBrush);
|
||||||
|
DeleteObject(DesktopBrush);
|
||||||
|
}
|
||||||
|
|
||||||
static LRESULT CALLBACK
|
static LRESULT CALLBACK
|
||||||
DtbgWindowProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
DtbgWindowProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LRESULT Result;
|
LRESULT Result;
|
||||||
PAINTSTRUCT PS;
|
|
||||||
HBRUSH DesktopBrush;
|
|
||||||
|
|
||||||
switch(Msg)
|
switch(Msg)
|
||||||
{
|
{
|
||||||
|
@ -49,12 +57,22 @@ DtbgWindowProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
Result = 0;
|
Result = 0;
|
||||||
break;
|
break;
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
|
{
|
||||||
|
PAINTSTRUCT PS;
|
||||||
|
|
||||||
BeginPaint(Wnd, &PS);
|
BeginPaint(Wnd, &PS);
|
||||||
DesktopBrush = CreateSolidBrush(RGB(58, 110, 165));
|
DtbgPaint(PS.hdc, &(PS.rcPaint));
|
||||||
FillRect(PS.hdc, &(PS.rcPaint), DesktopBrush);
|
|
||||||
DeleteObject(DesktopBrush);
|
|
||||||
EndPaint(Wnd, &PS);
|
EndPaint(Wnd, &PS);
|
||||||
Result = 0;
|
Result = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case WM_ERASEBKGND:
|
||||||
|
{
|
||||||
|
RECT ClientRect;
|
||||||
|
GetClientRect(Wnd, &ClientRect);
|
||||||
|
DtbgPaint((HDC)wParam, &ClientRect);
|
||||||
|
Result = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PM_SHOW_DESKTOP:
|
case PM_SHOW_DESKTOP:
|
||||||
Result = ! SetWindowPos(Wnd,
|
Result = ! SetWindowPos(Wnd,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue