Patch #1197009 [wxMSW] Proper repainting when resizing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2005-05-07 19:12:23 +00:00
parent 5ba5649b59
commit 3fca879ce0

View File

@ -2310,6 +2310,31 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
break;
#endif // !__WXWINCE__
case WM_WINDOWPOSCHANGED:
{
WINDOWPOS *lpPos = (WINDOWPOS *)lParam;
if ( !(lpPos->flags & SWP_NOSIZE) )
{
RECT rc;
::GetClientRect(GetHwnd(), &rc);
AutoHRGN hrgnClient(::CreateRectRgnIndirect(&rc));
AutoHRGN hrgnNew(::CreateRectRgn(lpPos->x, lpPos->y,
lpPos->cx, lpPos->cy));
AutoHRGN hrgn(::CreateRectRgn(0, 0, 0, 0));
// we need to invalidate any new exposed areas here
// to force them to repaint
if ( ::CombineRgn(hrgn, hrgnNew, hrgnClient, RGN_DIFF) != NULLREGION )
::InvalidateRgn(GetHwnd(), hrgn, TRUE);
if ( ::CombineRgn(hrgn, hrgnClient, hrgnNew, RGN_DIFF) != NULLREGION )
::InvalidateRgn(GetHwnd(), hrgn, TRUE);
}
}
break;
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
case WM_ACTIVATEAPP:
// This implicitly sends a wxEVT_ACTIVATE_APP event