]> git.saurik.com Git - wxWidgets.git/commitdiff
adaptions for latest dc changes
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Nov 2007 16:40:30 +0000 (16:40 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Nov 2007 16:40:30 +0000 (16:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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()