- wxPanel *panel = wxDynamicCast(m_instance, wxPanel);
-
- if (panel == NULL)
- panel = new wxPanel(m_parentAsWindow,
- GetID(),
- GetPosition(), GetSize(),
- GetStyle(wxT("style"), wxTAB_TRAVERSAL),
- GetName());
- else
- panel->Create(m_parentAsWindow,
- GetID(),
- GetPosition(), GetSize(),
- GetStyle(wxT("style"), wxTAB_TRAVERSAL),
- GetName());
+ XRC_MAKE_INSTANCE(panel, wxPanel)
+
+ panel->Create(m_parentAsWindow,
+ GetID(),
+ GetPosition(), GetSize(),
+ GetStyle(wxT("style"), wxTAB_TRAVERSAL),
+ GetName());
+