always use wxStaticCast in XRCCTRL (asserts in case of bad use in debug build)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2004-10-19 15:13:11 +00:00
parent b8387e0450
commit ae688b6468

View File

@ -291,13 +291,8 @@ private:
// wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog");
// XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value"));
#ifdef __WXDEBUG__
#define XRCCTRL(window, id, type) \
(wxDynamicCast((window).FindWindow(XRCID(id)), type))
#else
#define XRCCTRL(window, id, type) \
((type*)((window).FindWindow(XRCID(id))))
#endif
(wxStaticCast((window).FindWindow(XRCID(id)), type))
// wxXmlResourceHandler is an abstract base class for resource handlers
// capable of creating a control from an XML node.