+#endif // wxUSE_DYNAMIC_CLASSES/!wxUSE_DYNAMIC_CLASSES
+
+#define wxIS_KIND_OF(obj, className) obj->IsKindOf(&className::sm_class##className)
+
+// Just seems a bit nicer-looking (pretend it's not a macro)
+#define wxIsKindOf(obj, className) obj->IsKindOf(&className::sm_class##className)
+
+// to be replaced by dynamic_cast<> in the future
+#define wxDynamicCast(obj, className) \
+ ((obj) && ((obj)->IsKindOf(&className::sm_class##className)) \
+ ? (className *)(obj) \
+ : (className *)0)
+
+#define wxConstCast(obj, className) ((className *)(obj))
+
+#ifdef __WXDEBUG__
+ inline void wxCheckCast(void *ptr)
+ {
+ wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") );
+ }