]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/graphics.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / msw / graphics.cpp
index 06497f479c435f214fd85009215204aeab33f597..94716dde7d7410c158dc9f303b36a497d9f13cd4 100644 (file)
@@ -1439,13 +1439,15 @@ void wxGDIPlusRenderer::Unload()
 wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxWindowDC& dc)
 {
     EnsureIsLoaded();
-    return new wxGDIPlusContext(this,(HDC) dc.GetHDC());
+    wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl );
+    return new wxGDIPlusContext(this,(HDC) msw->GetHDC());
 }
 
 wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc)
 {
     EnsureIsLoaded();
-    return new wxGDIPlusContext(this,(HDC) dc.GetHDC());
+    wxMSWDCImpl *msw = wxDynamicCast( dc.GetImpl() , wxMSWDCImpl );
+    return new wxGDIPlusContext(this,(HDC) msw->GetHDC());
 }
 
 wxGraphicsContext * wxGDIPlusRenderer::CreateMeasuringContext()