]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
see http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/97537
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index 83f7efc9d5edfd2c64cbbd278ce0a29274178c14..7039eb149e0b25686fb275d4bcb8f83136880430 100644 (file)
@@ -175,7 +175,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
                     msStyle,
                     0, 0, 0, 0,
                     GetWinHwnd(parent),
-                    (HMENU)m_windowId,
+                    (HMENU)m_windowId.GetValue(),
                     wxGetInstance(),
                     NULL
                    );
@@ -227,7 +227,7 @@ void wxBitmapButton::OnMouseEnterOrLeave(wxMouseEvent& event)
 void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap)
 {
 #if wxUSE_IMAGE
-    if ( !HasFlag(wxBU_AUTODRAW) && !m_disabledSetByUser )
+    if ( !HasFlag(wxBU_AUTODRAW) && !m_disabledSetByUser && bitmap.IsOk() )
     {
         m_bmpDisabled = wxBitmap(bitmap.ConvertToImage().ConvertToGreyscale());
     }