eVC3 (older WinCE) build fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-30 21:20:44 +00:00
parent 4ff2699952
commit 3cdcf4d444

View File

@@ -490,7 +490,7 @@ void wxDC::DestroyClippingRegion()
// on desktop WIN32 also, since the WIN32 docs imply that the user // on desktop WIN32 also, since the WIN32 docs imply that the user
// clipping region is independent from the paint clipping region. // clipping region is independent from the paint clipping region.
::SelectClipRgn(GetHdc(), 0); ::SelectClipRgn(GetHdc(), 0);
#else #else
// TODO: this should restore the previous clipping region, // TODO: this should restore the previous clipping region,
// so that OnPaint processing works correctly, and the update // so that OnPaint processing works correctly, and the update
// clipping region doesn't get destroyed after the first // clipping region doesn't get destroyed after the first
@@ -498,7 +498,7 @@ void wxDC::DestroyClippingRegion()
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000); HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
::SelectClipRgn(GetHdc(), rgn); ::SelectClipRgn(GetHdc(), rgn);
::DeleteObject(rgn); ::DeleteObject(rgn);
#endif #endif
} }
wxDCBase::DestroyClippingRegion(); wxDCBase::DestroyClippingRegion();
@@ -1745,9 +1745,11 @@ void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxLogLastError(_T("GetTextExtentPoint32()")); wxLogLastError(_T("GetTextExtentPoint32()"));
} }
#if !defined(_WIN32_WCE) || (_WIN32_WCE >= 400)
// the result computed by GetTextExtentPoint32() may be too small as it // the result computed by GetTextExtentPoint32() may be too small as it
// accounts for under/overhang of the first/last character while we want // accounts for under/overhang of the first/last character while we want
// just the bounding rect for this string so adjust the width as needed // just the bounding rect for this string so adjust the width as needed
// (using API not available in 2002 SDKs of WinCE)
if ( len > 0 ) if ( len > 0 )
{ {
ABC width; ABC width;
@@ -1769,6 +1771,7 @@ void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
} }
//else: GetCharABCWidths() failed, not a TrueType font? //else: GetCharABCWidths() failed, not a TrueType font?
} }
#endif // !defined(_WIN32_WCE) || (_WIN32_WCE >= 400)
TEXTMETRIC tm; TEXTMETRIC tm;
::GetTextMetrics(GetHdc(), &tm); ::GetTextMetrics(GetHdc(), &tm);