X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/155ecd4c4221d3bbc7aa93d472d11948f21d21ab..c3a58b249e576b73b01cd74deb1cf879aa6e1975:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index b82972500e..1d16f90dab 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -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;