diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 9647e080b2..067cad4056 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -61,8 +61,10 @@ public: virtual void Raise(); virtual void Lower(); +#if wxUSE_DEFERRED_SIZING virtual bool BeginRepositioningChildren(); virtual void EndRepositioningChildren(); +#endif // wxUSE_DEFERRED_SIZING virtual bool Show(bool show = true); virtual bool ShowWithEffect(wxShowEffect effect, diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 01c9d59584..3cc19e0965 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -5034,9 +5034,10 @@ bool wxWindowMSW::HandleExitSizeMove() return HandleWindowEvent(event); } +#if wxUSE_DEFERRED_SIZING + bool wxWindowMSW::BeginRepositioningChildren() { -#if wxUSE_DEFERRED_SIZING int numChildren = 0; for ( HWND child = ::GetWindow(GetHwndOf(this), GW_CHILD); child; @@ -5062,12 +5063,10 @@ bool wxWindowMSW::BeginRepositioningChildren() // Return true to indicate that EndDeferWindowPos() should be called. return true; -#endif // wxUSE_DEFERRED_SIZING } void wxWindowMSW::EndRepositioningChildren() { -#if wxUSE_DEFERRED_SIZING wxASSERT_MSG( m_hDWP, wxS("Shouldn't be called") ); // reset m_hDWP to NULL so that child windows don't try to use our @@ -5091,9 +5090,10 @@ void wxWindowMSW::EndRepositioningChildren() wxWindowMSW * const child = node->GetData(); child->MSWEndDeferWindowPos(); } -#endif // wxUSE_DEFERRED_SIZING } +#endif // wxUSE_DEFERRED_SIZING + bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam) { // when we resize this window, its children are probably going to be