DC updates and an associated .Def file update

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2001-04-11 18:05:27 +00:00
parent ac7fb818cc
commit e1a688e45e
6 changed files with 274 additions and 246 deletions

View File

@@ -143,16 +143,42 @@ wxDC::wxDC(void)
m_bOwnsDC = FALSE;
m_hDC = 0;
m_nDCCount = 0;
m_hOldPS = NULL;
m_hPS = NULL;
m_bIsPaintTime = FALSE; // True at Paint Time
m_brush.GetColour().Set("WHITE");
}
} // end of wxDC::wxDC
wxDC::~wxDC(void)
{
}
if ( m_hDC != 0 )
{
SelectOldObjects(m_hDC);
// if we own the HDC, we delete it, otherwise we just release it
if (m_bOwnsDC)
{
if(m_hPS)
{
::GpiAssociate(m_hPS, NULLHANDLE);
::GpiDestroyPS(m_hPS);
}
m_hPS = NULLHANDLE;
::DevCloseDC((HDC)m_hDC);
}
else
{
//
// Just Dissacociate, not destroy if we don't own the DC
//
if(m_hPS)
{
::GpiAssociate(m_hPS, NULLHANDLE);
}
}
}
} // end of wxDC::~wxDC
// This will select current objects out of the DC,
// which is what you have to do before deleting the
@@ -187,7 +213,7 @@ void wxDC::SelectOldObjects(
m_font = wxNullFont;
m_backgroundBrush = wxNullBrush;
m_vSelectedBitmap = wxNullBitmap;
}
} // end of wxDC::SelectOldObjects
// ---------------------------------------------------------------------------
// clipping