X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/837e57436a89516a5fa9f478f401e06bd872c17c..8a68d8b6c13323ad187062b0be009f6d22af77f0:/src/msw/dcmemory.cpp diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 1a4b151391..03e89a1c91 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -24,10 +24,9 @@ #include "wx/utils.h" #endif -#include "wx/dcmemory.h" +#include "wx/msw/private.h" -#include -#include "wx/msw/winundef.h" +#include "wx/dcmemory.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) @@ -46,6 +45,12 @@ wxMemoryDC::wxMemoryDC(void) SetBrush(*wxWHITE_BRUSH); SetPen(*wxBLACK_PEN); + + // the background mode is only used for text background + // and is set in DrawText() to OPAQUE as required, other- + // wise always TRANSPARENT, RR + ::SetBkMode( GetHdc(), TRANSPARENT ); + } wxMemoryDC::wxMemoryDC(wxDC *old_dc) @@ -59,6 +64,12 @@ wxMemoryDC::wxMemoryDC(wxDC *old_dc) SetBrush(*wxWHITE_BRUSH); SetPen(*wxBLACK_PEN); + + // the background mode is only used for text background + // and is set in DrawText() to OPAQUE as required, other- + // wise always TRANSPARENT, RR + ::SetBkMode( GetHdc(), TRANSPARENT ); + } wxMemoryDC::~wxMemoryDC(void)