]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
Include commctrl.h properly.
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index 3aef7085d141d48d6d0fdf9b1defa9966446c1f4..7dbb9a1582ce108555bcf9e39553c31707190cf3 100644 (file)
@@ -18,8 +18,9 @@
 
 #if wxUSE_BMPBUTTON
 
+#include "wx/bmpbuttn.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/bmpbuttn.h"
     #include "wx/log.h"
     #include "wx/dcmemory.h"
 #endif
@@ -304,8 +305,7 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item)
     }
 
     // draw the bitmap
-    wxDC dst;
-    dst.SetHDC((WXHDC) hDC, false);
+    wxDCTemp dst((WXHDC)hDC);
     dst.DrawBitmap(*bitmap, x1, y1, true);
 
     // draw focus / disabled state, if auto-drawing