From 7ab0ebbcabf2a84234f05e5b2e7932948c007e45 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 4 Jun 2015 16:36:28 -0400 Subject: [PATCH] Switched from InvalidateRect() to RedrawWindow(). Fixes some minor bugs. --- redo/windows/resize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redo/windows/resize.c b/redo/windows/resize.c index 52934ca6..313e464f 100644 --- a/redo/windows/resize.c +++ b/redo/windows/resize.c @@ -56,8 +56,8 @@ void doResizes(void) uiWindowResizeChild(w); hwnd = (HWND) uiControlHandle(uiControl(w)); // we used SWP_NOREDRAW; we need to queue a redraw ourselves - // TODO use RedrawWindow() to bypass WS_CLIPCHILDREN complications - if (InvalidateRect(hwnd, NULL, TRUE) == 0) + // force all controls to be redrawn; this fixes things like the date-time picker's up-down not showing up until hovered over (and bypasses complications caused by WS_CLIPCHILDREN and WS_CLIPSIBLINGS, which we don't use but other controls might) + if (RedrawWindow(hwnd, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_ALLCHILDREN) == 0) logLastError("error redrawing controls after a resize in doResizes()"); } }