]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ownerdrw.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / msw / ownerdrw.cpp
index f527ed834ba1de0ef2570691df32102bdd2a3f5a..c781c560c38c6a3a30e79b905796e535d2549461 100644 (file)
@@ -198,7 +198,10 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
 
         dc.SetFont(GetFontToUse());
 
-        dc.GetTextExtent(str, (long *)pwidth, (long *)pheight);
+        wxCoord w, h;
+        dc.GetTextExtent(str, &w, &h);
+        *pwidth = w;
+        *pheight = h;
 
         // add space at the end of the menu for the submenu expansion arrow
         // this will also allow offsetting the accel string from the right edge
@@ -309,7 +312,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
     }
 
 
-    HDC hdc = GetHdcOf(dc);
+    wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
+    HDC hdc = GetHdcOf(*impl);
     COLORREF colOldText = ::SetTextColor(hdc, colText),
              colOldBack = ::SetBkColor(hdc, colBack);