[Lazarus] Drawing text in WinCE

John vd Waeter john at jvdw.nl
Thu Jan 29 18:31:22 CET 2009


Paul van Helden wrote:
> Hi All,
> 
> I'm new to Lazarus having decided to switch from Delphi for a WinCE 
> project. I'm stumped though. Labels on forms display garbage characters. 
> Having spent a whole two days learning about Lazarus internals, Unicode, 
> Widestrings, etc., I'm now pulling out my hair and the project cannot 
> continue.
> 
> The following code produces the same "garbage characters":
> 
> procedure TGPSForm.SatellitePaintBoxPaint(Sender: TObject);
> var
>   Rect: TRect;
>   Dx: Integer;
>   W: WideString;
> begin
>   with SatellitePaintBox do
>   begin
>     Rect:=ClientRect;
>     W:='Abc';
>     Windows.ExtTextOutW(Canvas.Handle, 1, 1, 0, LPRECT(@Rect), 
> PWideChar(W), Length(W), @Dx);
>   end;
> end;
> 
> Any ideas?
> 

Hmm,
Dunno, I use KOL without major problems.
But what is output when you try:

with SatellitePaintBox do
  begin
    Canvas.Textou(1,1,'Abc');
  end;

?

John



More information about the Lazarus mailing list