button(btnbmp) of buttonbar disable caption color fixed

Post Reply
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

button(btnbmp) of buttonbar disable caption color fixed

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Shuming,

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply