button(btnbmp) of buttonbar disable caption color fixed
Posted: Mon Dec 03, 2007 7:35 am
METHOD Paint() CLASS TBtnBmp
...
if ! Empty( ::cCaption )
nClr = If( IsWindowEnabled( ::hWnd ), ::nClrText, CLR_HGRAY )
SetTextColor( ::hDC, nClr ) // add the line ,show disable button ccaption/text color
nTop = 2 * ( ::nHeight / 3 ) + If( ::lPressed, 1, 0 ) + If( At( CRLF, ::cCaption ) == 0, 5, 0 )
SetBkMode( ::hDC, 1 )
...
Enjoy this.
Shuming Wang
...
if ! Empty( ::cCaption )
nClr = If( IsWindowEnabled( ::hWnd ), ::nClrText, CLR_HGRAY )
SetTextColor( ::hDC, nClr ) // add the line ,show disable button ccaption/text color
nTop = 2 * ( ::nHeight / 3 ) + If( ::lPressed, 1, 0 ) + If( At( CRLF, ::cCaption ) == 0, 5, 0 )
SetBkMode( ::hDC, 1 )
...
Enjoy this.
Shuming Wang