Can the wxAny class be used to store a wxCheckBox class or other wxControl based classes?
wxPanel *panel = new wxPanel(this, wxID_ANY);
wxCheckBox test(panel, idMenuAbout + 1, wxT("Show title"), wxPoint(20, 20));
wxAny checkBox = test;
The above code generates the error 'wxCheckBoxBase& wxCheckBoxBase::operator=(const wxCheckBoxBase&)’ is private
Thanks.
The problem is not with
wxAnybut with the fact thatwxCheckBoxBaseis made non-copyable:wx/checkbox.h
wx/defs.h