Removed references to DEBUG and WXDEBUG; cured Motif font problem; removed

some warnings in OGL; fixed bug in wxChoice


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-09 11:57:05 +00:00
parent 605c9c8318
commit ea57084d10
47 changed files with 205 additions and 321 deletions

View File

@@ -129,16 +129,10 @@ wxDC::~wxDC(void)
// DC.
void wxDC::SelectOldObjects(WXHDC dc)
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects %X\n", this);
#endif
if (dc)
{
if (m_oldBitmap)
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBITMAP %X\n", m_oldBitmap);
#endif
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
if (m_selectedBitmap.Ok())
{
@@ -148,38 +142,23 @@ void wxDC::SelectOldObjects(WXHDC dc)
m_oldBitmap = 0 ;
if (m_oldPen)
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPEN %X\n", m_oldPen);
#endif
::SelectObject((HDC) dc, (HPEN) m_oldPen);
}
m_oldPen = 0 ;
if (m_oldBrush)
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBRUSH %X\n", m_oldBrush);
#endif
::SelectObject((HDC) dc, (HBRUSH) m_oldBrush);
}
m_oldBrush = 0 ;
if (m_oldFont)
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HFONT %X\n", m_oldFont);
#endif
::SelectObject((HDC) dc, (HFONT) m_oldFont);
}
m_oldFont = 0 ;
if (m_oldPalette)
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPALETTE %X\n", m_oldPalette);
#endif
::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE);
}
#if WXDEBUG > 1
wxDebugMsg("wxDC::SelectOldObjects: Done.\n");
#endif
m_oldPalette = 0 ;
}
@@ -216,13 +195,7 @@ void wxDC::DestroyClippingRegion(void)
if (m_clipping && m_hDC)
{
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
#if WXDEBUG > 1
wxDebugMsg("wxDC::DestroyClippingRegion: Selecting HRGN %X\n", rgn);
#endif
SelectClipRgn((HDC) m_hDC, rgn);
#if WXDEBUG > 1
wxDebugMsg("wxDC::DestroyClippingRegion: Deleting HRGN %X\n", rgn);
#endif
DeleteObject(rgn);
}
m_clipping = FALSE;
@@ -266,9 +239,6 @@ void wxDC::SetPalette(const wxPalette& palette)
if (m_oldPalette)
{
::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE);
#if WXDEBUG > 1
wxDebugMsg("wxDC::SetPalette: set old palette %X\n", m_oldPalette);
#endif
m_oldPalette = 0;
}
@@ -281,13 +251,6 @@ void wxDC::SetPalette(const wxPalette& palette)
if (!m_oldPalette)
m_oldPalette = (WXHPALETTE) oldPal;
#if WXDEBUG > 1
wxDebugMsg("wxDC::SetPalette %X: selected palette %X\n", this, m_palette.GetHPALETTE());
if (oldPal)
wxDebugMsg("wxDC::SetPalette: oldPal was palette %X\n", oldPal);
if (m_oldPalette)
wxDebugMsg("wxDC::SetPalette: m_oldPalette is palette %X\n", m_oldPalette);
#endif
::RealizePalette((HDC) m_hDC);
}
}
@@ -643,9 +606,6 @@ void wxDC::SetFont(const wxFont& the_font)
if (m_font.Ok() && m_font.GetResourceHandle())
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::SetFont: Selecting HFONT %X\n", m_font.GetResourceHandle());
#endif
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
if (f == NULL)
{
@@ -723,9 +683,6 @@ void wxDC::DrawText(const wxString& text, long x, long y, bool use16bit)
#if 0
if (m_font.Ok() && m_font.GetResourceHandle())
{
#if WXDEBUG > 1
wxDebugMsg("wxDC::DrawText: Selecting HFONT %X\n", m_font.GetResourceHandle());
#endif
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
if (!m_oldFont)
m_oldFont = (WXHFONT) f;