Print Page | Close Window

Pane Manager bug in 17.2.0

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23027
Printed Date: 24 December 2024 at 11:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pane Manager bug in 17.2.0
Posted By: adrien
Subject: Pane Manager bug in 17.2.0
Date 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;
}


-------------
http://www.wingate.com - http://www.wingate.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net