m_frozenness = 0;
m_hWnd = 0;
- m_hDWP = 0;
m_xThumbSize = 0;
m_yThumbSize = 0;
if (height < 0)
height = 0;
- // if our parent had prepared a defer window handle for us, use it
- HDWP hdwp = m_parent ? (HDWP)m_parent->m_hDWP : NULL;
- if ( hdwp )
+ if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) )
{
- hdwp = ::DeferWindowPos(hdwp, GetHwnd(), NULL,
- x, y, width, height,
- SWP_NOZORDER);
- if ( !hdwp )
- {
- wxLogLastError(_T("DeferWindowPos"));
- }
-
- // hdwp must be updated as it may have been changed
- m_parent->m_hDWP = (WXHANDLE)hdwp;
- }
-
- // otherwise (or if deferring failed) move the window in place immediately
- if ( !hdwp )
- {
- if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) )
- {
- wxLogLastError(wxT("MoveWindow"));
- }
+ wxLogLastError(wxT("MoveWindow"));
}
}
(void)HandleDestroy();
break;
- case WM_WINDOWPOSCHANGING:
- {
- // when we resize this window, its children are probably going
- // to be repositioned as well, prepare to use DeferWindowPos()
- // for them
- const int numChildren = GetChildren().GetCount();
- if ( numChildren > 1 )
- {
- m_hDWP = (WXHANDLE)::BeginDeferWindowPos(numChildren);
- if ( !m_hDWP )
- {
- wxLogLastError(_T("BeginDeferWindowPos"));
- }
- }
- }
- break;
-
case WM_SIZE:
processed = HandleSize(LOWORD(lParam), HIWORD(lParam), wParam);
-
- if ( m_hDWP )
- {
- // put all child controls in place at once now
- if ( !::EndDeferWindowPos((HDWP)m_hDWP) )
- {
- wxLogLastError(_T("EndDeferWindowPos"));
- }
-
- m_hDWP = NULL;
- }
break;
case WM_MOVE: