diff --git a/include/wx/graphics.h b/include/wx/graphics.h index bb639a77f8..ee1879f91d 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -438,10 +438,8 @@ public: #endif #endif -#ifndef wxNO_RTTI // Create a context from a DC of unknown type, if supported, returns NULL otherwise static wxGraphicsContext* CreateFromUnknownDC(const wxDC& dc); -#endif static wxGraphicsContext* CreateFromNative( void * context ); diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index d7062dadd4..56cd73ecdd 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -926,9 +926,9 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp #endif #endif -#ifndef wxNO_RTTI wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc) { +#ifndef wxNO_RTTI if ( const wxWindowDC *windc = dynamic_cast(&dc) ) return Create(*windc); @@ -946,10 +946,10 @@ wxGraphicsContext* wxGraphicsContext::CreateFromUnknownDC(const wxDC& dc) return Create(*mfdc); #endif #endif +#endif // !wxNO_RTTI return NULL; } -#endif wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context ) {