diff --git a/include/wx/compositewin.h b/include/wx/compositewin.h index 48d0ae344e..ec26a414b5 100644 --- a/include/wx/compositewin.h +++ b/include/wx/compositewin.h @@ -33,17 +33,6 @@ class wxCompositeWindow : public W public: typedef W BaseWindowClass; - // Default ctor doesn't do anything. - wxCompositeWindow() - { - this->Connect - ( - wxEVT_CREATE, - wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate) - ); - - } - // Override all wxWindow methods which must be forwarded to the composite // window parts. @@ -136,6 +125,17 @@ public: wxSetFocusToChild(this, NULL); } +protected: + // Default ctor sets things up for handling children events correctly. + wxCompositeWindow() + { + this->Connect + ( + wxEVT_CREATE, + wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate) + ); + } + private: // Must be implemented by the derived class to return all children to which // the public methods we override should forward to.