X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/953ccd3da935af4f03732ef87a0dba214c802e65..549c6f67f9181e3ad8abfffa8c0c6cdd7ec49e5a:/src/msw/dcmemory.cpp diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 60bbb50735..03e89a1c91 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -24,9 +24,9 @@ #include "wx/utils.h" #endif -#include "wx/dcmemory.h" +#include "wx/msw/private.h" -#include +#include "wx/dcmemory.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) @@ -45,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) @@ -58,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) @@ -81,7 +93,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap) // a device context if (bitmap.GetSelectedInto() && (bitmap.GetSelectedInto() != this)) { - wxFatalError("Error in wxMemoryDC::SelectObject\nBitmap is selected in another wxMemoryDC.\nDelete the first wxMemoryDC or use SelectObject(NULL)"); + wxFatalError(_T("Error in wxMemoryDC::SelectObject\nBitmap is selected in another wxMemoryDC.\nDelete the first wxMemoryDC or use SelectObject(NULL)")); return; } @@ -110,7 +122,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap) if (bm == ERROR) { - wxFatalError("Error in wxMemoryDC::SelectObject\nBitmap may not be loaded, or may be selected in another wxMemoryDC.\nDelete the first wxMemoryDC to deselect bitmap."); + wxFatalError(_T("Error in wxMemoryDC::SelectObject\nBitmap may not be loaded, or may be selected in another wxMemoryDC.\nDelete the first wxMemoryDC to deselect bitmap.")); } else if (!m_oldBitmap) m_oldBitmap = (WXHBITMAP) bm;