diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index 01d2df34f8..8b6e0ff52d 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -396,8 +396,6 @@ protected: virtual void MSWUpdateFontOnDPIChange(const wxSize& newDPI) override; - virtual void MSWAfterReparent() override; - virtual bool MSWGetDarkModeSupport(MSWDarkModeSupport& support) const override; virtual int MSWGetToolTipMessage() const override; diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index ad3bc6dd32..1196337007 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -632,11 +632,6 @@ protected: virtual bool DoPopupMenu( wxMenu *menu, int x, int y ) override; #endif // wxUSE_MENUS_NATIVE - // Called by Reparent() after the window parent changes, i.e. GetParent() - // returns the new parent inside this function. - virtual void MSWAfterReparent(); - - // the window handle WXHWND m_hWnd; diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 8c83aad369..e08f99ce35 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -365,11 +365,6 @@ void wxListCtrl::MSWInitHeader() m_headerCustomDraw->UseHeaderThemeColors(hwndHdr); } -void wxListCtrl::MSWAfterReparent() -{ - // This is not used any more, to be removed. -} - WXDWORD wxListCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const { WXDWORD wstyle = wxListCtrlBase::MSWGetStyle(style, exstyle); diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e1cabfe8e7..ab9ad274f1 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1705,17 +1705,12 @@ bool wxWindowMSW::Reparent(wxWindowBase *parent) ::SetParent(hWndChild, hWndParent); - MSWAfterReparent(); - - return true; -} - -void wxWindowMSW::MSWAfterReparent() -{ if ( wxHasWindowExStyle(this, WS_EX_CONTROLPARENT) ) { EnsureParentHasControlParentStyle(GetParent()); } + + return true; } void wxWindowMSW::MSWDisableComposited()