#include "wx/module.h"
#endif
-#include "wx/graphics.h"
+#include "wx/private/graphics.h"
#include "wx/msw/wrapgdip.h"
#include "wx/stack.h"
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()