X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a71d815bbe669ebb9bdb9409926a272c37a5a9aa..a45d2855c6882edc830777de2cec9ac21caced61:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 3aef7085d1..3b67925eaa 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -304,8 +304,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