HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL;
#else
HDWP hdwp = 0;
-#endif
+#endif
wxMoveWindowDeferred(hdwp, this, GetHwnd(), x, y, width, height);
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
if ( !::GetCursorPosWinCE(&pt))
#else
if ( !::GetCursorPos(&pt) )
-#endif
+#endif
{
wxLogLastError(wxT("GetCursorPos"));
}
numChildren ++;
}
- // Protect against valid m_hDWP being overwritten
+ // Protect against valid m_hDWP being overwritten
bool useDefer = false;
if ( numChildren > 1 )
{
if (!m_hDWP)
- {
+ {
m_hDWP = (WXHANDLE)::BeginDeferWindowPos(numChildren);
if ( !m_hDWP )
{
// may have depending on what the users EVT_SIZE handler does...)
HDWP hDWP = (HDWP)m_hDWP;
m_hDWP = NULL;
-
+
// do put all child controls in place at once
if ( !::EndDeferWindowPos(hDWP) )
{