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:
parent
79b60780fe
commit
5368c72d37
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user