X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c45a644eda9a0c6309090d8450780ca37faed9c8..b4a2ab728bf4627ab2b41385b69e31f10c1fd3b1:/src/msw/dc.cpp?ds=sidebyside diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index d693d7a278..13f84710e2 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -46,6 +46,9 @@ #include #if wxUSE_COMMON_DIALOGS +#if wxUSE_NORLANDER_HEADERS + #include +#endif #include #endif @@ -174,7 +177,7 @@ void wxDC::DoSetClippingRegion(long cx, long cy, long cw, long ch) void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region) { - wxCHECK_RET( region.GetHRGN(), _T("invalid clipping region") ); + wxCHECK_RET( region.GetHRGN(), T("invalid clipping region") ); wxRect box = region.GetBox(); @@ -249,7 +252,7 @@ void wxDC::Clear() } else { - wxCHECK_RET( m_selectedBitmap.Ok(), _T("this DC can't be cleared") ); + wxCHECK_RET( m_selectedBitmap.Ok(), T("this DC can't be cleared") ); rect.left = 0; rect.top = 0; rect.right = m_selectedBitmap.GetWidth(); @@ -374,8 +377,8 @@ void wxDC::DoDrawArc(long x1,long y1,long x2,long y2, long xc, long yc) Arc(GetHdc(),xxx1,yyy1,xxx2,yyy2, xx1,yy1,xx2,yy2); - CalcBoundingBox((xc-radius), (yc-radius)); - CalcBoundingBox((xc+radius), (yc+radius)); + CalcBoundingBox((long)(xc-radius), (long)(yc-radius)); + CalcBoundingBox((long)(xc+radius), (long)(yc+radius)); } void wxDC::DoDrawPoint(long x, long y) @@ -591,6 +594,9 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, long x, long y, bool useMask ) HDC cdc = GetHdc(); HDC memdc = ::CreateCompatibleDC( cdc ); HBITMAP hbitmap = (HBITMAP) bmp.GetHBITMAP( ); + + wxASSERT_MSG( hbitmap, T("bitmap is ok but HBITMAP is NULL?") ); + ::SelectObject( memdc, hbitmap ); ::BitBlt( cdc, x, y, bmp.GetWidth(), bmp.GetHeight(), memdc, 0, 0, SRCCOPY); ::DeleteDC( memdc ); @@ -712,7 +718,7 @@ void wxDC::SetFont(const wxFont& the_font) HFONT f = (HFONT) ::SelectObject(GetHdc(), (HFONT) m_font.GetResourceHandle()); if (f == (HFONT) NULL) { - wxLogDebug(_T("::SelectObject failed in wxDC::SetFont.")); + wxLogDebug(T("::SelectObject failed in wxDC::SetFont.")); } if (!m_oldFont) m_oldFont = (WXHFONT) f;