+ if ( m_ok )
+ {
+ SetBrush(*wxWHITE_BRUSH);
+ SetPen(*wxBLACK_PEN);
+
+ // the background mode is only used for text background and is set in
+ // DrawText() to OPAQUE as required, otherwise always TRANSPARENT
+ ::SetBkMode( GetHdc(), TRANSPARENT );
+ }
+}
+
+bool wxMemoryDC::CreateCompatible(wxDC *dc)
+{
+ m_hDC = (WXHDC)::CreateCompatibleDC(dc ? GetHdcOf(*dc) : NULL);
+
+ // as we created the DC, we must delete it in the dtor
+ m_bOwnsDC = true;
+
+ m_ok = m_hDC != 0;
+
+ return m_ok;