/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name: src/msw/dcmemory.cpp
// Purpose: wxMemoryDC class
// Author: Julian Smart
// Modified by:
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "dcmemory.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
+#include "wx/dcmemory.h"
+
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/log.h"
#include "wx/msw/private.h"
-#include "wx/dcmemory.h"
-
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
// wxMemoryDC
// ----------------------------------------------------------------------------
-wxMemoryDC::wxMemoryDC()
-{
- CreateCompatible(NULL);
-
- Init();
-}
-
wxMemoryDC::wxMemoryDC(wxDC *dc)
{
wxCHECK_RET( dc, _T("NULL dc in wxMemoryDC ctor") );
- dc->BeginDrawing();
-
CreateCompatible(dc);
- dc->EndDrawing();
-
Init();
}
m_hDC = (WXHDC)::CreateCompatibleDC(dc ? GetHdcOf(*dc) : NULL);
// as we created the DC, we must delete it in the dtor
- m_bOwnsDC = TRUE;
+ m_bOwnsDC = true;
m_ok = m_hDC != 0;
return m_ok;
}
-void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
+void wxMemoryDC::DoSelect( const wxBitmap& bitmap)
{
// select old bitmap out of the device context
if ( m_oldBitmap )
wxDC::DoDrawRectangle(x, y, width, height);
}
}
-