+#define wxConstCast(obj, className) ((className *)(obj))
+
+#ifdef __WXDEBUG__
+ inline void wxCheckCast(void *ptr)
+ {
+ wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") );
+ }
+
+ #define wxStaticCast(obj, className) \
+ (wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj)))
+
+#else // !Debug
+ #define wxStaticCast(obj, className) ((className *)(obj))
+#endif // Debug/!Debug
+