wxCoord wBtn,
hBtn;
- dc.GetMultiLineTextExtent(wxStripMenuCodes(GetLabel()), &wBtn, &hBtn);
+ dc.GetMultiLineTextExtent(GetLabelText(), &wBtn, &hBtn);
// add a margin -- the button is wider than just its label
wBtn += 3*GetCharWidth();
}
COLORREF colFg = wxColourToRGB(GetForegroundColour());
- DrawButtonText(hdc, &rectBtn,
- (state & ODS_NOACCEL ? wxStripMenuCodes(GetLabel())
- : GetLabel()),
- state & ODS_DISABLED ? GetSysColor(COLOR_GRAYTEXT)
- : colFg);
+ if ( state & ODS_DISABLED ) colFg = GetSysColor(COLOR_GRAYTEXT) ;
+ wxString label = GetLabel();
+ if ( state & ODS_NOACCEL ) label = GetLabelText() ;
+ DrawButtonText(hdc, &rectBtn, label, colFg);
return true;
}