Page 1 of 1

button(btnbmp) of buttonbar disable caption color fixed

Posted: Mon Dec 03, 2007 7:35 am
by ShumingWang
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

Posted: Mon Dec 03, 2007 9:43 am
by Antonio Linares
Shuming,

Thanks! :-)