Fix wxMSW build with wxUSE_DEFERRED_SIZING==0
Don't define BeginRepositioningChildren() and EndRepositioningChildren() at all in this case instead of defining them as "do nothing" functions because BeginRepositioningChildren() still needs to return a bool, so the old code didn't compile and we would need to add another "#else" to fix this -- instead make it simpler by just not compiling at all in this case.
This commit is contained in:
@@ -61,8 +61,10 @@ public:
|
|||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
|
||||||
|
#if wxUSE_DEFERRED_SIZING
|
||||||
virtual bool BeginRepositioningChildren();
|
virtual bool BeginRepositioningChildren();
|
||||||
virtual void EndRepositioningChildren();
|
virtual void EndRepositioningChildren();
|
||||||
|
#endif // wxUSE_DEFERRED_SIZING
|
||||||
|
|
||||||
virtual bool Show(bool show = true);
|
virtual bool Show(bool show = true);
|
||||||
virtual bool ShowWithEffect(wxShowEffect effect,
|
virtual bool ShowWithEffect(wxShowEffect effect,
|
||||||
|
@@ -5034,9 +5034,10 @@ bool wxWindowMSW::HandleExitSizeMove()
|
|||||||
return HandleWindowEvent(event);
|
return HandleWindowEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_DEFERRED_SIZING
|
||||||
|
|
||||||
bool wxWindowMSW::BeginRepositioningChildren()
|
bool wxWindowMSW::BeginRepositioningChildren()
|
||||||
{
|
{
|
||||||
#if wxUSE_DEFERRED_SIZING
|
|
||||||
int numChildren = 0;
|
int numChildren = 0;
|
||||||
for ( HWND child = ::GetWindow(GetHwndOf(this), GW_CHILD);
|
for ( HWND child = ::GetWindow(GetHwndOf(this), GW_CHILD);
|
||||||
child;
|
child;
|
||||||
@@ -5062,12 +5063,10 @@ bool wxWindowMSW::BeginRepositioningChildren()
|
|||||||
|
|
||||||
// Return true to indicate that EndDeferWindowPos() should be called.
|
// Return true to indicate that EndDeferWindowPos() should be called.
|
||||||
return true;
|
return true;
|
||||||
#endif // wxUSE_DEFERRED_SIZING
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindowMSW::EndRepositioningChildren()
|
void wxWindowMSW::EndRepositioningChildren()
|
||||||
{
|
{
|
||||||
#if wxUSE_DEFERRED_SIZING
|
|
||||||
wxASSERT_MSG( m_hDWP, wxS("Shouldn't be called") );
|
wxASSERT_MSG( m_hDWP, wxS("Shouldn't be called") );
|
||||||
|
|
||||||
// reset m_hDWP to NULL so that child windows don't try to use our
|
// 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();
|
wxWindowMSW * const child = node->GetData();
|
||||||
child->MSWEndDeferWindowPos();
|
child->MSWEndDeferWindowPos();
|
||||||
}
|
}
|
||||||
#endif // wxUSE_DEFERRED_SIZING
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_DEFERRED_SIZING
|
||||||
|
|
||||||
bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
|
bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
|
||||||
{
|
{
|
||||||
// when we resize this window, its children are probably going to be
|
// when we resize this window, its children are probably going to be
|
||||||
|
Reference in New Issue
Block a user