Pane Manager bug in 17.2.0 |
Post Reply |
Author | |
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
Posted: 19 May 2016 at 10:20pm |
I had a resize bug, where if a splitter was moved, the growing pane would not redraw until some other event caused a repaint. I tracked it down to the filtering of messages whilst in capture for the splitter move. The code was calling ValidateRect on the window, which prevented repaints from happening. I commented it out and now it's happy and so am I. Even 2 paints would be better than none. I haven't checked if it's getting 2, but it's smooth as silk.
BOOL CXTPDrawHelpers::ProcessPendingPaintMessages(HWND hWnd /*= NULL*/) { BOOL bResult = TRUE; MSG msg; while (::PeekMessage(&msg, hWnd, WM_PAINT, WM_PAINT, PM_NOREMOVE) || ::PeekMessage(&msg, hWnd, WM_ERASEBKGND, WM_ERASEBKGND, PM_NOREMOVE) || ::PeekMessage(&msg, hWnd, WM_SYNCPAINT, WM_SYNCPAINT, PM_NOREMOVE) || ::PeekMessage(&msg, hWnd, WM_NCPAINT, WM_NCPAINT, PM_NOREMOVE)) { if (WM_QUIT != msg.message) { if (::PeekMessage(&msg, hWnd, msg.message, msg.message, PM_REMOVE)) { if (WM_QUIT != msg.message) // WM_QUIT should never happen here but still extra verification won't harm { ::DispatchMessage(&msg); // This ensures the window won't enter the second painting cycle. // ::ValidateRect(msg.hwnd, NULL); } else { // Re-post WM_QUIT as it's been removed. ::PostQuitMessage(static_cast<int>(msg.wParam)); bResult = FALSE; break; } } } else { bResult = FALSE; break; } } return bResult; } |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |