Switched from InvalidateRect() to RedrawWindow(). Fixes some minor bugs.

This commit is contained in:
Pietro Gagliardi 2015-06-04 16:36:28 -04:00
parent 3b8533f033
commit 7ab0ebbcab
1 changed files with 2 additions and 2 deletions

View File

@ -56,8 +56,8 @@ void doResizes(void)
uiWindowResizeChild(w); uiWindowResizeChild(w);
hwnd = (HWND) uiControlHandle(uiControl(w)); hwnd = (HWND) uiControlHandle(uiControl(w));
// we used SWP_NOREDRAW; we need to queue a redraw ourselves // we used SWP_NOREDRAW; we need to queue a redraw ourselves
// TODO use RedrawWindow() to bypass WS_CLIPCHILDREN complications // 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 (InvalidateRect(hwnd, NULL, TRUE) == 0) if (RedrawWindow(hwnd, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_ALLCHILDREN) == 0)
logLastError("error redrawing controls after a resize in doResizes()"); logLastError("error redrawing controls after a resize in doResizes()");
} }
} }