RTTI ?? create multiple object at runtime wxwidgets? -
hi sorry stupid question
what right way create multiple control object list of array of label of object ...?
thank
the function wxcreatedynamicobject can used construct new object of given type, supplying string name. if have pointer wxclassinfo object instead, can call wxclassinfo::createobject.
you must include implement_dynamic_class macro in every class want able dynamically create objects. implement_dynamic_class macro not initialises static wxclassinfo member, defines global function capable of creating dynamic object of class in question.
example
in header file:
class wxframe : public wxwindow { declare_dynamic_class(wxframe) private: wxstring m_title; public: ... };
in c++ file:
implement_dynamic_class(wxframe, wxwindow) wxframe::wxframe() { ... }
Comments
Post a Comment