diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 182f28e842..61d3551bdf 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -293,13 +293,12 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface, WindowID w wxMemoryDC* mdc = surface ? new wxMemoryDC(static_cast(surface)->hdc) : new wxMemoryDC(); - mdc->GetImpl()->SetWindow(GETWIN(winid)); hdc = mdc; hdcOwned = true; if (width < 1) width = 1; if (height < 1) height = 1; - bitmap = new wxBitmap(); - bitmap->CreateWithDIPSize(width, height,(GETWIN(winid))->GetDPIScaleFactor()); + bitmap = new wxBitmap(GETWIN(winid)->ToPhys(wxSize(width, height))); + bitmap->SetScaleFactor(GETWIN(winid)->GetDPIScaleFactor()); mdc->SelectObject(*bitmap); }