+#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)
+
+// The 'this' pointer is always true, so use this version to cast the this
+// pointer and avoid compiler warnings.
+#define wxDynamicCastThis(className) \
+ (IsKindOf(&className::sm_class##className) \
+ ? (className *)(this) \
+ : (className *)0)