Fixed, it was a little bug in function ExtTextOut()
Michel, do you need the libs for Borland ?
Working code:
HB_FUNC( EXTTEXTOUT ) // ( hDC, nRow, nCol, aRect, cText, nStyle ) --> lSuccess
{
RECT rct;
UINT fuOptions;
LPCSTR szText;
WORD wLen = 0;
if ( ( hb_pcount() > 4 ) && ( HB_ISCHAR( 5 ) ) )
{
szText = hb_parc( 5 );
wLen = hb_parclen( 5 );
}
// if ( wLen > 0 )
// {
fw_parRect( 4, &rct );
fuOptions = ( hb_pcount() > 5 ? hb_parnl( 6 ) : ETO_OPAQUE | ETO_CLIPPED );
if ( isutf8( szText, wLen ) )
{
LPWSTR pW = UTF8toUTF16( szText );
hb_retl( ExtTextOutW( ( HDC ) fw_parH( 1 ), hb_parni( 3 ), hb_parni( 2 ),
fuOptions, &rct, pW, wcslen( pW ), 0 ) );
hb_xfree( pW );
}
else
hb_retl( ExtTextOutA( ( HDC ) fw_parH( 1 ), hb_parni( 3 ), hb_parni( 2 ),
fuOptions, &rct, szText, wLen, 0 ) );
// } else hb_retl( 0 );
}