X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3b89fa936319c3b40aeeb7772490c18aac74380..e3778b4d9c7eebc39f496a9dd055638e06fb9140:/src/msw/button.cpp diff --git a/src/msw/button.cpp b/src/msw/button.cpp index d92ea4da35..10bb135fb5 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -157,6 +157,7 @@ public: wxODButtonImageData(wxButton *btn, const wxBitmap& bitmap) { SetBitmap(bitmap, wxButton::State_Normal); + SetBitmap(bitmap.ConvertToDisabled(), wxButton::State_Disabled); m_dir = wxLEFT; @@ -225,10 +226,11 @@ public: wxButton::State_Max), m_hwndBtn(GetHwndOf(btn)) { - // initialize all bitmaps to normal state + // initialize all bitmaps except for the disabled one to normal state for ( int n = 0; n < wxButton::State_Max; n++ ) { - m_iml.Add(bitmap); + m_iml.Add(n == wxButton::State_Disabled ? bitmap.ConvertToDisabled() + : bitmap); } m_data.himl = GetHimagelistOf(&m_iml); @@ -516,7 +518,7 @@ WXDWORD wxButton::MSWGetStyle(long style, WXDWORD *exstyle) const ); // we must use WS_CLIPSIBLINGS with the buttons or they would draw over - // each other in any resizeable dialog which has more than one button in + // each other in any resizable dialog which has more than one button in // the bottom msStyle |= WS_CLIPSIBLINGS;