]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
showing a bevel button for a multiline label (is not multline on the OS level, but...
[wxWidgets.git] / src / msw / dc.cpp
index 7977fab35d58dc51100d2b4a2d5ae4ce7a3076ce..92af78fd5374fc93b92dd6bf04ec31843f09ca25 100644 (file)
@@ -41,6 +41,7 @@
 #endif
 
 #include "wx/msw/private.h" // needs to be before #include <commdlg.h>
+#include "wx/msw/missing.h" // needs to be before #include <commdlg.h>
 
 #include "wx/sysopt.h"
 #include "wx/dcprint.h"
@@ -779,18 +780,21 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffs
 
 void
 wxDC::DoDrawPolyPolygon(int n,
-                        int start[],
+                        int count[],
                         wxPoint points[],
                         wxCoord xoffset,
                         wxCoord yoffset,
                         int fillStyle)
 {
+#ifdef __WXWINCE__
+    wxDCBase::DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle);
+#else    
     WXMICROWIN_CHECK_HDC
 
     wxColourChanger cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling
     int i, cnt;
     for (i = cnt = 0; i < n; i++)
-        cnt += start[i];
+        cnt += count[i];
 
     // Do things less efficiently if we have offsets
     if (xoffset != 0 || yoffset != 0)
@@ -803,9 +807,13 @@ wxDC::DoDrawPolyPolygon(int n,
 
             CalcBoundingBox(cpoints[i].x, cpoints[i].y);
         }
+#ifndef __WXWINCE__
         int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
-        (void)PolyPolygon(GetHdc(), cpoints, start, n);
+#endif        
+        (void)PolyPolygon(GetHdc(), cpoints, count, n);
+#ifndef __WXWINCE__
         SetPolyFillMode(GetHdc(),prev);
+#endif        
         delete[] cpoints;
     }
     else
@@ -813,10 +821,16 @@ wxDC::DoDrawPolyPolygon(int n,
         for (i = 0; i < cnt; i++)
             CalcBoundingBox(points[i].x, points[i].y);
 
+#ifndef __WXWINCE__
         int prev = SetPolyFillMode(GetHdc(),fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING);
-        (void)PolyPolygon(GetHdc(), (POINT*) points, start, n);
+#endif        
+        (void)PolyPolygon(GetHdc(), (POINT*) points, count, n);
+#ifndef __WXWINCE__
         SetPolyFillMode(GetHdc(),prev);
+#endif        
     }
+#endif
+  // __WXWINCE__
 }
 
 void wxDC::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
@@ -2079,7 +2093,11 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
                                      SRCCOPY
                                      ) == (int)GDI_ERROR )
                 {
-                    wxLogLastError(wxT("StretchDIBits"));
+                    // On Win9x this API fails most (all?) of the time, so
+                    // logging it becomes quite distracting.  Since it falls
+                    // back to the code below this is not really serious, so
+                    // don't log it.                     
+                    //wxLogLastError(wxT("StretchDIBits"));
                 }
                 else
                 {