]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/anybutton.cpp
Refactor wxXRC to allow defining handlers outside of xrc library.
[wxWidgets.git] / src / msw / anybutton.cpp
index 6e4438b3714c024dd1924890f47ee8f774c2ffe0..2bf1b41f4ca8fdbdf0b885716744f42840d4dfed 100644 (file)
@@ -150,8 +150,9 @@ public:
     wxODButtonImageData(wxAnyButton *btn, const wxBitmap& bitmap)
     {
         SetBitmap(bitmap, wxAnyButton::State_Normal);
+#if wxUSE_IMAGE
         SetBitmap(bitmap.ConvertToDisabled(), wxAnyButton::State_Disabled);
-
+#endif
         m_dir = wxLEFT;
 
         // we use margins when we have both bitmap and text, but when we have
@@ -222,8 +223,12 @@ public:
         // initialize all bitmaps except for the disabled one to normal state
         for ( int n = 0; n < wxAnyButton::State_Max; n++ )
         {
+#if wxUSE_IMAGE
             m_iml.Add(n == wxAnyButton::State_Disabled ? bitmap.ConvertToDisabled()
                                                     : bitmap);
+#else
+            m_iml.Add(bitmap);
+#endif
         }
 
         m_data.himl = GetHimagelistOf(&m_iml);