]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
Added GSocket_Select() and fixed some things
[wxWidgets.git] / src / msw / dc.cpp
index d693d7a27881ddc90be8051e715501b46fb4605d..fa195426e2602c671aeadc57820e3f1e5f60a9b8 100644 (file)
@@ -46,6 +46,9 @@
 #include <math.h>
 
 #if wxUSE_COMMON_DIALOGS
+#if wxUSE_NORLANDER_HEADERS
+    #include <windows.h>
+#endif
     #include <commdlg.h>
 #endif
 
@@ -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 );