1. fixes to wxDC deleting logic (should fix ~wxPrinterDC leak), some code

reorganized/removed
2. applied (slightly modified) wxEnhMetaFileSimpleDataObject patch


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-04-09 01:22:48 +00:00
parent 4658c44ec2
commit 7ba4fbebbc
21 changed files with 436 additions and 301 deletions

View File

@@ -1,12 +1,12 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcscreen.cpp
// Name: src/msw/dcscreen.cpp
// Purpose: wxScreenDC class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -33,22 +33,12 @@
IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
// Create a DC representing the whole screen
wxScreenDC::wxScreenDC(void)
wxScreenDC::wxScreenDC()
{
m_hDC = (WXHDC) ::GetDC((HWND) NULL);
m_hDCCount ++;
m_hDC = (WXHDC) ::GetDC((HWND) NULL);
// 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 );
}
wxScreenDC::~wxScreenDC(void)
{
SelectOldObjects(m_hDC);
::ReleaseDC((HWND) NULL, (HDC) m_hDC);
m_hDC = 0;
m_hDCCount --;
// the background mode is only used for text background and is set in
// DrawText() to OPAQUE as required, otherwise always TRANSPARENT
::SetBkMode( GetHdc(), TRANSPARENT );
}