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:
@@ -2310,6 +2310,31 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
|||||||
break;
|
break;
|
||||||
#endif // !__WXWINCE__
|
#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__)
|
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATEAPP:
|
||||||
// This implicitly sends a wxEVT_ACTIVATE_APP event
|
// This implicitly sends a wxEVT_ACTIVATE_APP event
|
||||||
|
Reference in New Issue
Block a user