wxODButtonImageData(wxButton *btn, const wxBitmap& bitmap)
{
SetBitmap(bitmap, wxButton::State_Normal);
+ SetBitmap(bitmap.ConvertToDisabled(), wxButton::State_Disabled);
m_dir = wxLEFT;
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);
);
// 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;