[CMAKE]
[reactos.git] / dll / win32 / shell32 / shlview.c
index f3cd550..2218504 100644 (file)
@@ -282,9 +282,14 @@ static BOOL ShellView_CreateList (IShellViewImpl * This)
        TRACE("%p\n",This);
 
        dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
-                 LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE;
+          LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_AUTOARRANGE;
         dwExStyle = WS_EX_CLIENTEDGE;
 
+    if (This->FolderSettings.fFlags & FWF_DESKTOP) 
+       dwStyle |= LVS_ALIGNLEFT;
+    else
+       dwStyle |= LVS_ALIGNTOP;
+
        switch (This->FolderSettings.ViewMode)
        {
          case FVM_ICON:        dwStyle |= LVS_ICON;            break;
@@ -324,8 +329,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));
@@ -1475,7 +1483,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
 
          case LVN_ENDLABELEDITW:
            {
-             TRACE("-- LVN_ENDLABELEDITA %p\n",This);
+             TRACE("-- LVN_ENDLABELEDITW %p\n",This);
              if (lpdi->item.pszText)
              {
                HRESULT hr;
@@ -1833,7 +1841,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,8 +1851,14 @@ 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 WM_SYSCOLORCHANGE:
+        /* Forward WM_SYSCOLORCHANGE to common controls */
+        SendMessage(pThis->hWndList, WM_SYSCOLORCHANGE, 0, 0);
+        break;
+
       case CWM_GETISHELLBROWSER:
           return (LRESULT)pThis->pShellBrowser;
        }