From 83c347aaef6978702b850541828fe17ed5234824 Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Wed, 25 May 2011 21:28:27 +0000 Subject: [PATCH] [SHELL32_NEW] - Merge 51322 and 51323 - Return 1 in WM_ERASEBKGND when desktop is painted - Fix background for desktop icons and their labels - Moreover fixes explorer_new background - Properly arrange icons in explorer shell view window. This also fixes navigating in files with keyboard arrows svn path=/branches/shell32_new-bringup/; revision=51915 --- dll/win32/shell32/desktop.cpp | 3 +-- dll/win32/shell32/shlview.cpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dll/win32/shell32/desktop.cpp b/dll/win32/shell32/desktop.cpp index bd0e75ba591..60370f138bb 100644 --- a/dll/win32/shell32/desktop.cpp +++ b/dll/win32/shell32/desktop.cpp @@ -399,8 +399,7 @@ LRESULT CALLBACK CDesktopBrowser::ProgmanWindowProc(IN HWND hwnd, IN UINT uMsg, switch (uMsg) { case WM_ERASEBKGND: - PaintDesktop((HDC)wParam); - break; + return (LRESULT)PaintDesktop((HDC)wParam); case WM_GETISHELLBROWSER: Ret = (LRESULT)((IShellBrowser *)pThis); diff --git a/dll/win32/shell32/shlview.cpp b/dll/win32/shell32/shlview.cpp index 004595c841d..3d439ea27ad 100644 --- a/dll/win32/shell32/shlview.cpp +++ b/dll/win32/shell32/shlview.cpp @@ -447,9 +447,14 @@ BOOL CDefView::CreateList() 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 (FolderSettings.fFlags & FWF_DESKTOP) + dwStyle |= LVS_ALIGNLEFT; + else + dwStyle |= LVS_ALIGNTOP; + switch (FolderSettings.ViewMode) { case FVM_ICON: dwStyle |= LVS_ICON; break; @@ -489,8 +494,11 @@ BOOL CDefView::CreateList() * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow * and activate drop shadows if necessary */ - if (0) + if (1) + { SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE); + SendMessageW(hWndList, LVM_SETBKCOLOR, 0, CLR_NONE); + } else { SendMessageW(hWndList, LVM_SETTEXTBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); @@ -840,7 +848,8 @@ LRESULT CDefView::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHand LRESULT CDefView::OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { if (FolderSettings.fFlags & (FWF_DESKTOP | FWF_TRANSPARENT)) - return 1; + return SendMessageW(GetParent(), WM_ERASEBKGND, wParam, lParam); /* redirect to parent */ + bHandled = FALSE; return 0; }