Re: Vous les faites avec quoi vos textes à 90° ?
BigGrizzly a écrit :
> J'ai cherché dans la JVCL, j'ai pas trouvé de "RotatedLabel"...
>
> Alors j'ai adapté un bout de code trouvé dans l'aide W32...
>
> procedure TFenAppMutes.PaintBox1Paint(Sender: TObject);
> var
> plf : TLogFont;
> hfnt, oldh : HFONT;
> ALV : TVersionInfo;
> AText : string;
> begin
> FillChar(plf, SizeOf(plf), 0);
> StrPCopy(plf.lfFaceName, 'Arial');
> plf.lfHeight := -MulDiv(8, GetDeviceCaps(PaintBox1.Canvas.Handle,
> LOGPIXELSY), 72);
> plf.lfWeight := FW_NORMAL;
> plf.lfEscapement := 900;
> hfnt := CreateFontIndirect(plf);
> try
> //PaintBox1.Canvas.Font.Handle := hfnt;
> oldh := SelectObject(PaintBox1.Canvas.Handle, hfnt);
> try
> ALV := TVersionInfo.Create(Application.ExeName);
> try
> AText := 'Version ' + LongVersionToString(ALV.FileLongVersion);
> PaintBox1.Canvas.TextOut(PaintBox1.Width -
> PaintBox1.Canvas.TextHeight(AText), PaintBox1.Height
> {PaintBox1.Canvas.TextWidth(AText)}, AText);
> finally
> ALV.Free;
> end;
> finally
> SelectObject(PaintBox1.Canvas.Handle, oldh);
> end;
> finally
> DeleteObject(hfnt);
> end;
> end;
>
>
oxLabel de la Venus Lib (des fois c'est utile d'avoir 25 libs :-) Mais qui doit faire la même chose que ton code.
|