Enrico,
In Class TBtnBmp please replace:
Code: Select all
::Say( 2 * ( ::nHeight / 3 ) + If( ::lPressed, 1, 0 ),;
( ::nWidth / 2 ) - ( GetTextWidth( ::hDC, ::cCaption,;
::oWnd:oFont:hFont ) / 2 ) + If( ::lPressed, 1, 0 ),;
::cCaption, nClr,, ::oWnd:oFont, .T., .T. )
with
Code: Select all
nTop = 2 * ( ::nHeight / 3 ) + If( ::lPressed, 1, 0 ) + If( At( CRLF, ::cCaption ) == 0, 5, 0 )
SetBkMode( ::hDC, 1 )
hOldFont = SelectObject( ::hDC, ::oWnd:oFont:hFont )
DrawText( ::hDC, ::cCaption,;
{ nTop - 5, If( ::lPressed, 1, 0 ), nTop + ::nHeight / 3, ::nWidth + If( ::lPressed, 1, 0 ) },;
nOr( DT_VCENTER, DT_CENTER, DT_WORDBREAK ) )
SelectObject( ::hDC, hOldFont )
You need these defines:
Code: Select all
#define DT_CENTER 1
#define DT_VCENTER 4
#define DT_WORDBREAK 16
Thanks!