X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aceeebce6d61c9f239a08ab53e669ad040deee96..02d5015b1cbb99d7a2e2ab7818cd46b2b4514957:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index fd05a25f53..1d16f90dab 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -23,10 +23,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/dcmemory.h" + #include "wx/image.h" #endif #include "wx/msw/private.h" -#include "wx/image.h" #include "wx/msw/uxtheme.h" @@ -184,7 +184,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, SubclassWin(m_hWnd); SetPosition(pos); - SetBestSize(size); + SetInitialSize(size); return true; } @@ -408,8 +408,7 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) } // draw the bitmap - wxClientDC dst; - dst.SetHDC((WXHDC) hDC, false); + wxDCTemp dst((WXHDC)hDC); dst.DrawBitmap(*bitmap, x1, y1, true); return true;