X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/316bba0c7207ceff140d0d8271962ad7c001ba8a..659ca93c425faabda30fce9dee68b38cb6868d14:/include/wx/msw/listbox.h diff --git a/include/wx/msw/listbox.h b/include/wx/msw/listbox.h index 54a53b1c58..b687aac8d7 100644 --- a/include/wx/msw/listbox.h +++ b/include/wx/msw/listbox.h @@ -38,7 +38,7 @@ class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase { public: // ctors and such - wxListBox(); + wxListBox() { Init(); } wxListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -47,6 +47,8 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr) { + Init(); + Create(parent, id, pos, size, n, choices, style, validator, name); } wxListBox(wxWindow *parent, wxWindowID id, @@ -57,6 +59,8 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr) { + Init(); + Create(parent, id, pos, size, choices, style, validator, name); } @@ -177,6 +181,9 @@ protected: #endif private: + // common part of all ctors + void Init(); + // call this when items are added to or deleted from the listbox or an // items text changes void MSWOnItemsChanged(); @@ -185,6 +192,7 @@ private: // i.e. if we need to call SetHorizontalExtent() from OnInternalIdle() bool m_updateHorizontalExtent; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxListBox) };