{
// parent pos/size isn't deferred so do it now but don't send
// WM_WINDOWPOSCHANGING since we don't want to change pos/size later
+ // we must use SWP_NOCOPYBITS here otherwise it paints incorrectly
+ // if other windows are size deferred
::SetWindowPos(GetHwnd(), NULL, x, y, width, height,
- SWP_NOZORDER | SWP_NOSENDCHANGING);
+ SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE |
+ SWP_NOCOPYBITS | SWP_NOSENDCHANGING);
}
// adjust fields widths to the new size
if ( hdwp )
{
hdwp = ::DeferWindowPos(hdwp, (HWND)hwnd, NULL, x, y, width, height,
- SWP_NOZORDER);
+ SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE);
if ( !hdwp )
{
wxLogLastError(_T("DeferWindowPos"));
break;
#endif // !__WXWINCE__
-#if !(defined(_WIN32_WCE) && _WIN32_WCE < 400)
- 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));
-
- // we need to invalidate any new exposed areas here
- // to force them to repaint
- if ( ::CombineRgn(hrgnNew, hrgnNew, hrgnClient, RGN_DIFF) != NULLREGION )
- ::InvalidateRgn(GetHwnd(), hrgnNew, TRUE);
- }
- }
- break;
-#endif
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
case WM_ACTIVATEAPP:
// This implicitly sends a wxEVT_ACTIVATE_APP event
ms.SetLeftDown( (GetAsyncKeyState(VK_LBUTTON) & (1<<15)) != 0 );
ms.SetMiddleDown( (GetAsyncKeyState(VK_MBUTTON) & (1<<15)) != 0 );
ms.SetRightDown( (GetAsyncKeyState(VK_RBUTTON) & (1<<15)) != 0 );
-
+
ms.SetControlDown( (GetAsyncKeyState(VK_CONTROL) & (1<<15)) != 0 );
ms.SetShiftDown( (GetAsyncKeyState(VK_SHIFT) & (1<<15)) != 0 );
ms.SetAltDown( (GetAsyncKeyState(VK_MENU) & (1<<15)) != 0 );
// ms.SetMetaDown();
-
+
return ms;
}