+ // also deal with disabled bitmap if we want to use them
+ if ( m_disabledImgList )
+ {
+ wxBitmap bmpDisabled = tool->GetDisabledBitmap();
+ if ( !bmpDisabled.Ok() )
+ {
+#if wxUSE_IMAGE
+ // no disabled bitmap specified but we still need to
+ // fill the space in the image list with something, so
+ // we grey out the normal bitmap
+ wxImage img = bmp.ConvertToImage();
+#if 0
+ img.SetMaskColour(wxLIGHT_GREY->Red(),
+ wxLIGHT_GREY->Green(),
+ wxLIGHT_GREY->Blue());
+#endif
+ wxImage imgGreyed;
+ wxCreateGreyedImage(img, imgGreyed);
+
+ bmpDisabled = wxBitmap(imgGreyed);
+#if 0
+ bmpDisabled.SetMask(new wxMask(bmpDisabled, *wxLIGHT_GREY));
+
+ MapBitmap(bmpDisabled.GetHBITMAP(),
+ bmpDisabled.GetWidth(),
+ bmpDisabled.GetHeight());
+#endif // 0
+#endif // wxUSE_IMAGE
+ }
+
+ m_disabledImgList->Add(bmpDisabled);
+ }
+