* ReactOS Operating System
*/
-#include "w32csr.h"
-
#define NDEBUG
+#include "w32csr.h"
#include <debug.h>
-#define DESKTOP_WINDOW_ATOM 32880
+#define DESKTOP_WINDOW_ATOM 32769
#define PM_SHOW_DESKTOP 1
#define PM_HIDE_DESKTOP 2
static LRESULT CALLBACK
DtbgWindowProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- switch(Msg)
+ PAINTSTRUCT PS;
+ HDC hDC;
+
+ switch(Msg)
{
case WM_ERASEBKGND:
+ PaintDesktop((HDC)wParam);
return 1;
case WM_PAINT:
{
- PAINTSTRUCT PS;
- RECT rc;
- HDC hDC;
-
- if(GetUpdateRect(Wnd, &rc, FALSE) &&
- (hDC = BeginPaint(Wnd, &PS)))
- {
- PaintDesktop(hDC);
+ if((hDC = BeginPaint(Wnd, &PS)))
EndPaint(Wnd, &PS);
- }
return 0;
}
case WM_CREATE:
return 0;
+ case WM_CLOSE:
+ return 0;
+
case WM_NOTIFY:
{
PPRIVATE_NOTIFY_DESKTOP nmh = (PPRIVATE_NOTIFY_DESKTOP)lParam;
* Create the desktop window class
*/
Class.cbSize = sizeof(WNDCLASSEXW);
- Class.style = 0;
+ Class.style = CS_GLOBALCLASS;
Class.lpfnWndProc = DtbgWindowProc;
Class.cbClsExtra = 0;
Class.cbWndExtra = 0;
return TRUE;
}
-static DWORD STDCALL
+static DWORD WINAPI
DtbgDesktopThread(PVOID Data)
{
HWND BackgroundWnd;