Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Pane Manager bug in 17.2.0
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pane Manager bug in 17.2.0

 Post Reply Post Reply
Author
Message
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Topic: Pane Manager bug in 17.2.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;
}
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.