From 67b6e93573f024de07cd1494964ef8f9d45be5ea Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Tue, 20 Oct 2009 14:37:30 +0000 Subject: [PATCH] wince: Patch from DRIGUS GmbH, implements LCLIntf.TextOut git-svn-id: trunk@22246 - --- lcl/interfaces/wince/wincewinapi.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/wince/wincewinapi.inc b/lcl/interfaces/wince/wincewinapi.inc index 1868bf3637..5e2269011d 100644 --- a/lcl/interfaces/wince/wincewinapi.inc +++ b/lcl/interfaces/wince/wincewinapi.inc @@ -2892,10 +2892,12 @@ end; ------------------------------------------------------------------------------} function TWinCEWidgetSet.TextOut(DC: HDC; X, Y: Integer; Str: PChar; Count: Integer): Boolean; +var + WS: WideString; begin - Result := false; -// Result := Boolean(Windows.ExtTextOut(DC, X, Y, Str, Count)); -// Result := Boolean(Windows.TextOut(DC, X, Y, Str, Count)); + // There is no Windows.TextOut in Windows CE, so we improvise with other routines + WS := UTF8ToUTF16(Copy(Str, 1, Count)); + Result := Boolean(Windows.ExtTextOut(DC, X, Y, 0, nil, PWideChar(WS), Length(WS), nil)); end; {------------------------------------------------------------------------------