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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -