]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/graphics.cpp
document On{Open,Save}Document()
[wxWidgets.git] / src / msw / graphics.cpp
index 06497f479c435f214fd85009215204aeab33f597..2d0e3f4edabac00a011bcfae1f6c35b315092a90 100644 (file)
@@ -35,7 +35,7 @@
     #include "wx/module.h"
 #endif
 
-#include "wx/graphics.h"
+#include "wx/private/graphics.h"
 #include "wx/msw/wrapgdip.h"
 
 #include "wx/stack.h"
@@ -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()