git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54009
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void ResizeGripper();
private:
void ResizeGripper();
private:
+ // this function is used to adjust Z-order of new children relative to the
+ // gripper if we have one
+ void OnWindowCreate(wxWindowCreateEvent& event);
+
+
wxWindow* m_oldFocus;
bool m_endModalCalled; // allow for closing within InitDialog
wxWindow* m_oldFocus;
bool m_endModalCalled; // allow for closing within InitDialog
#endif
if ( HasFlag(wxRESIZE_BORDER) )
#endif
if ( HasFlag(wxRESIZE_BORDER) )
+ Connect(wxEVT_CREATE,
+ wxWindowCreateEventHandler(wxDialog::OnWindowCreate));
+ }
+
+ // we used to have trouble with gripper appearing on top (and hence
+ // overdrawing) the other, real, dialog children -- check that this
+ // isn't the case automatically
+ wxASSERT_MSG( ::GetNextWindow((HWND)m_hGripper, GW_HWNDNEXT) == 0,
+ _T("Bug in wxWidgets: gripper should be at the bottom of Z-order") );
::DestroyWindow((HWND) m_hGripper);
m_hGripper = 0;
}
::DestroyWindow((HWND) m_hGripper);
m_hGripper = 0;
}
+void wxDialog::OnWindowCreate(wxWindowCreateEvent& event)
+{
+ if ( m_hGripper && IsShown() &&
+ event.GetWindow() && event.GetWindow()->GetParent() == this )
+ {
+ // Put gripper below the newly created child window
+ ::SetWindowPos((HWND)m_hGripper, HWND_BOTTOM, 0, 0, 0, 0,
+ SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ }
+
+ event.Skip();
+}
+
// ----------------------------------------------------------------------------
// wxWin event handlers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxWin event handlers
// ----------------------------------------------------------------------------