]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
don't statically link to SetMenuInfo(): it is not present in Win95/NT4
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index e1be21611f2270c55b891b3106919f67fcb30a17..4d982db963a8db9e6e061c68a247b531c0b8a829 100644 (file)
@@ -103,8 +103,6 @@ bitmap "focus" ,
 bitmap "disabled" ,
 */
 
-#define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1)
-
 bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
     const wxBitmap& bitmap,
     const wxPoint& pos,
@@ -494,8 +492,10 @@ wxSize wxBitmapButton::DoGetBestSize() const
 {
     if ( m_bmpNormal.Ok() )
     {
-        return wxSize(m_bmpNormal.GetWidth() + 2*m_marginX,
+        wxSize best(m_bmpNormal.GetWidth() + 2*m_marginX,
                       m_bmpNormal.GetHeight() + 2*m_marginY);
+        CacheBestSize(best);
+        return best;
     }
 
     // no idea what our best size should be, defer to the base class