[SHELL32]
authorRafal Harabien <rafalh@reactos.org>
Tue, 12 Apr 2011 18:45:06 +0000 (18:45 +0000)
committerRafal Harabien <rafalh@reactos.org>
Tue, 12 Apr 2011 18:45:06 +0000 (18:45 +0000)
* Return 1 in WM_ERASEBKGND when desktop is painted
* Fix background for desktop icons and their labels
* Moreover fixes explorer_new background

svn path=/trunk/; revision=51322

reactos/dll/win32/shell32/desktop.c
reactos/dll/win32/shell32/shlview.c

index 131e3cc..cd21bcb 100644 (file)
@@ -586,8 +586,7 @@ ProgmanWindowProc(IN HWND hwnd,
         switch (uMsg)
         {
             case WM_ERASEBKGND:
-                PaintDesktop((HDC)wParam);
-                break;
+                return (LRESULT)PaintDesktop((HDC)wParam);
 
             case WM_GETISHELLBROWSER:
                 Ret = (LRESULT)IShellBrowser_from_impl(This);
index 3355245..924d76e 100644 (file)
@@ -324,8 +324,11 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
           * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow
           * and activate drop shadows if necessary
           */
-         if (0)
+         if (1)
+         {
            SendMessageW(This->hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE);
+           SendMessageW(This->hWndList, LVM_SETBKCOLOR, 0, CLR_NONE);
+         }
          else
          {
            SendMessageW(This->hWndList, LVM_SETTEXTBKCOLOR, 0, GetSysColor(COLOR_DESKTOP));
@@ -1833,7 +1836,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara
          case WM_SHOWWINDOW:   UpdateWindow(pThis->hWndList);
                                break;
 
-         case WM_GETDLGCODE:   return SendMessageA(pThis->hWndList,uMessage,0,0);
+         case WM_GETDLGCODE:   return SendMessageW(pThis->hWndList,uMessage,0,0);
 
          case WM_DESTROY:
                                RevokeDragDrop(pThis->hWnd);
@@ -1843,7 +1846,7 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara
          case WM_ERASEBKGND:
            if ((pThis->FolderSettings.fFlags & FWF_DESKTOP) ||
                (pThis->FolderSettings.fFlags & FWF_TRANSPARENT))
-             return 1;
+            return SendMessageW(pThis->hWndParent, WM_ERASEBKGND, wParam, lParam); /* redirect to parent */
            break;
       case CWM_GETISHELLBROWSER:
           return (LRESULT)pThis->pShellBrowser;