fix borland error about string refernce

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott 2006-08-13 12:12:55 +00:00
parent 9be3f7558d
commit 047aa29670

View File

@ -849,11 +849,10 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
}
COLORREF colFg = wxColourToRGB(GetForegroundColour());
DrawButtonText(hdc, &rectBtn,
state & ODS_NOACCEL ? GetLabelText()
: 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;
}