Index: src/ch/FolderDialog.cpp =================================================================== diff -u -N -r9ddf8fdd5f641491dd30c49eb90f8f740314b6af -rafedcb6f4d37159266b6eaa97d8a7d0ce157de00 --- src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 9ddf8fdd5f641491dd30c49eb90f8f740314b6af) +++ src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision afedcb6f4d37159266b6eaa97d8a7d0ce157de00) @@ -20,8 +20,6 @@ #include "ch.h" #include "DirTreeCtrl.h" #include "FolderDialog.h" -#include "memdc.h" -#include "Theme Helpers.h" #include "shlobj.h" #include "StringHelpers.h" #include "TRecentPathsTools.h" @@ -67,6 +65,10 @@ CWnd* pWnd=CWnd::FromHandle(hwnd); CPaintDC dc(pWnd); + CRect rcPaint(dc.m_ps.rcPaint); + if (rcPaint.IsRectEmpty()) + break; + // exclude header from update rect (only in report view) int iID=GetDlgCtrlID(hwnd); if (iID == IDC_SHORTCUT_LIST) @@ -89,12 +91,12 @@ } } - CMemDC memdc(&dc, &dc.m_ps.rcPaint); + CMemDC memdc(dc, &dc.m_ps.rcPaint); if (dc.m_ps.fErase) - memdc.FillSolidRect(&dc.m_ps.rcPaint, GetSysColor(COLOR_WINDOW)); + memdc.GetDC().FillSolidRect(&dc.m_ps.rcPaint, GetSysColor(COLOR_WINDOW)); - CallWindowProc(pfWndProc, hwnd, WM_PAINT, (WPARAM)memdc.GetSafeHdc(), 0); + CallWindowProc(pfWndProc, hwnd, WM_PAINT, (WPARAM)memdc.GetDC().GetSafeHdc(), 0); return 0; } @@ -1037,8 +1039,7 @@ void CFolderDialog::ResizeControls(int cx, int cy) { // is app themed ? - CUxThemeSupport uxt; - bool bThemed=uxt.IsThemeSupported() && uxt.IsAppThemed(); + bool bThemed=IsAppThemed(); // settings const int iMargin=7; // dialog units