From 50ed9b9962df41affd07bd7283e76ad5ae2b050b Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Thu, 10 Oct 2002 22:50:09 +0000 Subject: [PATCH] Implement WM_SETREDRAW properly. --- dlls/comctl32/listview.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ed5cc5d5bc7..0d40806436d 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -153,6 +153,7 @@ typedef struct tagLISTVIEW_INFO HFONT hFont; INT ntmHeight; /* from GetTextMetrics from above font */ INT ntmAveCharWidth; /* from GetTextMetrics from above font */ + BOOL bRedraw; BOOL bFocus; INT nFocusedItem; RECT rcFocus; @@ -883,10 +884,11 @@ static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg, /******** Internal API functions ************************************/ /* The Invalidate* are macros, so we preserve the caller location */ -#define LISTVIEW_InvalidateRect(infoPtr, rect) do { \ +#define LISTVIEW_InvalidateRect(infoPtr, rect) while(infoPtr->bRedraw) { \ TRACE(" invalidating rect=%s\n", debugrect(rect)); \ InvalidateRect(infoPtr->hwndSelf, rect, TRUE); \ -} while (0) + break;\ +} #define LISTVIEW_InvalidateItem(infoPtr, nItem) do { \ RECT rcItem; \ @@ -8114,12 +8116,11 @@ static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedra */ static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw) { - /* FIXME: this is bogus */ - LRESULT lResult = DefWindowProcW(infoPtr->hwndSelf, WM_SETREDRAW, bRedraw, 0); + infoPtr->bRedraw = bRedraw; if(bRedraw) RedrawWindow(infoPtr->hwndSelf, NULL, 0, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ALLCHILDREN | RDW_ERASENOW); - return lResult; + return 0; } /***