]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
checking that a wxWindow is of run-time type wxWindow is hopefully useless
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index b82972500eaeb3ba14bd02d360e8308c21374792..1d16f90dab43b14438fcbbbadf6fc8ac554205ac 100644 (file)
@@ -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;