diff --git a/include/wx/event.h b/include/wx/event.h index 9d047f12cb..a60115c68f 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1369,7 +1369,7 @@ private: wxEVT_DESTROY */ -class WXDLLEXPORT wxWindowCreateEvent : public wxEvent +class WXDLLEXPORT wxWindowCreateEvent : public wxCommandEvent { DECLARE_DYNAMIC_CLASS(wxWindowCreateEvent) @@ -1379,7 +1379,7 @@ public: wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } }; -class WXDLLEXPORT wxWindowDestroyEvent : public wxEvent +class WXDLLEXPORT wxWindowDestroyEvent : public wxCommandEvent { DECLARE_DYNAMIC_CLASS(wxWindowDestroyEvent) diff --git a/src/common/event.cpp b/src/common/event.cpp index 646b0b89c4..3ace246251 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -524,14 +524,12 @@ void wxQueryNewPaletteEvent::CopyObject(wxObject& obj_d) const } wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win) - : wxEvent() { SetEventType(wxEVT_CREATE); SetEventObject(win); } wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win) - : wxEvent() { SetEventType(wxEVT_DESTROY); SetEventObject(win);