From 3f89a71323edbeb528272e3c49ed615c9fa9fbb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Zalewski?= Date: Wed, 11 Oct 2006 20:55:31 +0200 Subject: [PATCH] comctl32: header: Invalidate the control after a WM_SETREDRAW with wParam == TRUE. --- dlls/comctl32/header.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 63f91d82c1a..820e72ea359 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -1945,6 +1945,18 @@ HEADER_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam) return 0; } +static LRESULT HEADER_SetRedraw(HWND hwnd, WPARAM wParam, LPARAM lParam) +{ + /* ignoring the InvalidateRect calls is handled by user32. But some apps expect + * that we invalidate the header and this has to be done manually */ + LRESULT ret; + + ret = DefWindowProcW(hwnd, WM_SETREDRAW, wParam, lParam); + if (wParam) + InvalidateRect(hwnd, NULL, TRUE); + return ret; +} + /* Update the theme handle after a theme change */ static LRESULT HEADER_ThemeChanged(HWND hwnd) { @@ -2081,6 +2093,9 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_SETFONT: return HEADER_SetFont (hwnd, wParam, lParam); + case WM_SETREDRAW: + return HEADER_SetRedraw(hwnd, wParam, lParam); + default: if ((msg >= WM_USER) && (msg < WM_APP)) ERR("unknown msg %04x wp=%04x lp=%08lx\n",