compilation warning fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-24 19:33:55 +00:00
parent 6853365e97
commit 2b96d0fb4b

View File

@@ -1705,30 +1705,25 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
HBITMAP buffer_bmap ; HBITMAP buffer_bmap ;
#if wxUSE_DC_CACHEING #if wxUSE_DC_CACHEING
if (TRUE) // create a temp buffer bitmap and DCs to access it and the mask
{ wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
// create a temp buffer bitmap and DCs to access it and the mask dc_mask = (HDC) dcCacheEntry1->m_dc;
wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
dc_mask = (HDC) dcCacheEntry1->m_dc;
wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC()); wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC());
dc_buffer = (HDC) dcCacheEntry2->m_dc; dc_buffer = (HDC) dcCacheEntry2->m_dc;
wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(), wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(),
width, height); width, height);
buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap; buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap;
} #else // !wxUSE_DC_CACHEING
else // create a temp buffer bitmap and DCs to access it and the mask
#endif dc_mask = ::CreateCompatibleDC(GetHdcOf(*source));
{ dc_buffer = ::CreateCompatibleDC(GetHdc());
// create a temp buffer bitmap and DCs to access it and the mask buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height);
dc_mask = ::CreateCompatibleDC(GetHdcOf(*source)); ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap());
dc_buffer = ::CreateCompatibleDC(GetHdc()); ::SelectObject(dc_buffer, buffer_bmap);
buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height); #endif // wxUSE_DC_CACHEING/!wxUSE_DC_CACHEING
::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap());
::SelectObject(dc_buffer, buffer_bmap);
}
// copy dest to buffer // copy dest to buffer
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height, if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,