<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ausgabeproblem mit einem Label]]></title><description><![CDATA[<p>Moin.</p>
<p>Ich habe mir von <a href="http://www.torry.net/vcl/labels/3dlabels/jblabel3d.zip" rel="nofollow">http://www.torry.net/vcl/labels/3dlabels/jblabel3d.zip</a> eine Freeware 3D Label-Komponente geladen.</p>
<p><a href="http://www.torry.net/quicksearchd.php?String=Label3D&amp;Title=Yes" rel="nofollow">http://www.torry.net/quicksearchd.php?String=Label3D&amp;Title=Yes</a> =&gt; &quot;Label3D v.03.10.2001&quot;</p>
<p>Diese kann auch 360° Schrift darstellen, jedoch merk ich jetzt, das wenn ich 90° einstelle, die Schrift zwar auf der Form 90° gedreht ist, aber wenn ich das Programm ausführe, dann ist der Text auch zusätzlich oben links auf dem Desktop zu sehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Was natürlich garnicht toll ist.</p>
<p>Kann da jemand vielleicht helfen das rauszuoperieren? Wäre super <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Hier vielleicht der relevante Quellcode, ohne sich die Komponente laden zu müssen.</p>
<pre><code class="language-cpp">procedure TLabel3D.DrawAngleText(aCanvas:TCanvas;aRect:tRect;aAngle:Integer;aTxt:String);
{==========================================================================}
{ Draw text with FontIndirect (angle -&gt; escapement)                        }
{--------------------------------------------------------------------------}
var LFont             : TLogFont;
    hOldFont, hNewFont: HFont;
begin
  CalcTextPos(aRect,aAngle,aTxt);

  GetObject(aCanvas.Font.Handle,SizeOf(LFont),Addr(LFont));
  LFont.lfEscapement := aAngle*10;
  hNewFont := CreateFontIndirect(LFont);
  hOldFont := SelectObject(aCanvas.Handle,hNewFont);

  aCanvas.TextOut(aRect.Left,aRect.Top,aTxt);

  hNewFont := SelectObject(aCanvas.Handle,hOldFont);
  DeleteObject(hNewFont);
end;

{==========================================================================}
procedure TLabel3D.DoDrawText(var Rect: TRect; Flags: Longint);
{==========================================================================}
{ Draw the text normal or with angle and with 3D-effects                   }
{                                                                          }
{ 3D-effects: RZLABEL-component                                            }
{ (c) by Ray Konopka (Raize Software Solutions, Inc.)                      }
{ enhanced 3D-effect (c)2001 by Jaro Benes mailto:JBenes@micrel.cz         }
{--------------------------------------------------------------------------}
var Text        : String;
    TmpRect     : TRect;
    UpperColor  : TColor;
    LowerColor  : TColor;
    {$IFDEF WINDOWS}
    cStr        : array[0..255] of Char;
    {$ENDIF}
  begin
    Text := Caption;
    {$IFDEF WINDOWS}
    StrPCopy(cStr,Text);
    {$ENDIF}

    if (Flags and DT_CALCRECT &lt;&gt; 0) and ((Text = '') or ShowAccelChar and
    (Text[1] = '&amp;') and (Text[2] = #0)) then Text := Text + ' ';

    if not ShowAccelChar then Flags := Flags or DT_NOPREFIX;
    {$IfDef Win32}
    If FEllipsesStyle = esEnd Then Flags := Flags Or DT_END_ELLIPSIS
    Else If FEllipsesStyle = esPath Then Flags := Flags Or DT_PATH_ELLIPSIS;
    {$EndIf}
    If FEscapement=0 Then
      Case {$IfNDef Win32}FLayout{$Else}Layout{$EndIf} of
        tlTop:Flags := Flags Or DT_TOP;
        tlCenter:Flags := Flags Or DT_VCENTER Or DT_SINGLELINE;
        tlBottom:Flags := Flags Or DT_BOTTOM Or DT_SINGLELINE;
      End;

    Canvas.Font := Font;

    If FEscapement in [46..134] Then  ;
    {special manipulation with shadow position is unsupported- J.B.}

    UpperColor := FColorRaise;
    LowerColor := FColorRecess;

    if FTextStyle &lt;&gt; tsNone then
    begin
      TmpRect := Rect;
      If FTextStyle &lt;&gt; tsShadow Then OffsetRect(TmpRect,1,1)
      Else OffsetRect(TmpRect,FShift,FShift);
      Case FTextStyle of
        tsRecessed: Canvas.Font.Color := UpperColor;
        tsHeavyRecessed: Canvas.Font.Color := UpperColor;
        tsRaised: Canvas.Font.Color := LowerColor;
        tsLightRaised: Canvas.Font.Color := LowerColor;
        tsShadow: Canvas.Font.Color := LowerColor;
      End;
      if fEscapement &lt;&gt; 0 then
        DrawAngleText(Canvas,TmpRect,fEscapement,Text)
      else
        DrawText(Canvas.Handle,{$IFDEF WIN32}pChar(Text){$ELSE}cStr{$ENDIF},Length(Text),TmpRect,Flags);

      if FTextStyle in [tsHeavyRecessed,tsLightRaised] then
      begin
        TmpRect := Rect;
        OffsetRect(TmpRect,-1,-1);
        Case FTextStyle of
          tsHeavyRecessed: Canvas.Font.Color := LowerColor;
          tsLightRaised: Canvas.Font.Color := UpperColor;
        End;
        if fEscapement &lt;&gt; 0 then
          DrawAngleText(Canvas,TmpRect,fEscapement,Text)
        else
          DrawText(Canvas.Handle,{$IFDEF WIN32}pChar(Text){$ELSE}cStr{$ENDIF},Length(Text),TmpRect,Flags);
      end
    end;
    Canvas.Font.Color := Font.Color;
    if not Enabled then Canvas.Font.Color := clGrayText;
    {main color on font is upper}
    if fEscapement &lt;&gt; 0 then
      DrawAngleText(Canvas,Rect,fEscapement,Text)
    else
      DrawText(Canvas.Handle,{$IFDEF WIN32}pChar(Text){$ELSE}cStr{$ENDIF},Length(Text),Rect,Flags);
end;
</code></pre>
<p>Würd mich freuen wenn jemand soviel Ahnung von hat und den Fehler sieht. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/174373/ausgabeproblem-mit-einem-label</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 17:20:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/174373.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Feb 2007 09:00:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ausgabeproblem mit einem Label on Mon, 26 Feb 2007 09:00:39 GMT]]></title><description><![CDATA[<p>Moin.</p>
<p>Ich habe mir von <a href="http://www.torry.net/vcl/labels/3dlabels/jblabel3d.zip" rel="nofollow">http://www.torry.net/vcl/labels/3dlabels/jblabel3d.zip</a> eine Freeware 3D Label-Komponente geladen.</p>
<p><a href="http://www.torry.net/quicksearchd.php?String=Label3D&amp;Title=Yes" rel="nofollow">http://www.torry.net/quicksearchd.php?String=Label3D&amp;Title=Yes</a> =&gt; &quot;Label3D v.03.10.2001&quot;</p>
<p>Diese kann auch 360° Schrift darstellen, jedoch merk ich jetzt, das wenn ich 90° einstelle, die Schrift zwar auf der Form 90° gedreht ist, aber wenn ich das Programm ausführe, dann ist der Text auch zusätzlich oben links auf dem Desktop zu sehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Was natürlich garnicht toll ist.</p>
<p>Kann da jemand vielleicht helfen das rauszuoperieren? Wäre super <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Hier vielleicht der relevante Quellcode, ohne sich die Komponente laden zu müssen.</p>
<pre><code class="language-cpp">procedure TLabel3D.DrawAngleText(aCanvas:TCanvas;aRect:tRect;aAngle:Integer;aTxt:String);
{==========================================================================}
{ Draw text with FontIndirect (angle -&gt; escapement)                        }
{--------------------------------------------------------------------------}
var LFont             : TLogFont;
    hOldFont, hNewFont: HFont;
begin
  CalcTextPos(aRect,aAngle,aTxt);

  GetObject(aCanvas.Font.Handle,SizeOf(LFont),Addr(LFont));
  LFont.lfEscapement := aAngle*10;
  hNewFont := CreateFontIndirect(LFont);
  hOldFont := SelectObject(aCanvas.Handle,hNewFont);

  aCanvas.TextOut(aRect.Left,aRect.Top,aTxt);

  hNewFont := SelectObject(aCanvas.Handle,hOldFont);
  DeleteObject(hNewFont);
end;

{==========================================================================}
procedure TLabel3D.DoDrawText(var Rect: TRect; Flags: Longint);
{==========================================================================}
{ Draw the text normal or with angle and with 3D-effects                   }
{                                                                          }
{ 3D-effects: RZLABEL-component                                            }
{ (c) by Ray Konopka (Raize Software Solutions, Inc.)                      }
{ enhanced 3D-effect (c)2001 by Jaro Benes mailto:JBenes@micrel.cz         }
{--------------------------------------------------------------------------}
var Text        : String;
    TmpRect     : TRect;
    UpperColor  : TColor;
    LowerColor  : TColor;
    {$IFDEF WINDOWS}
    cStr        : array[0..255] of Char;
    {$ENDIF}
  begin
    Text := Caption;
    {$IFDEF WINDOWS}
    StrPCopy(cStr,Text);
    {$ENDIF}

    if (Flags and DT_CALCRECT &lt;&gt; 0) and ((Text = '') or ShowAccelChar and
    (Text[1] = '&amp;') and (Text[2] = #0)) then Text := Text + ' ';

    if not ShowAccelChar then Flags := Flags or DT_NOPREFIX;
    {$IfDef Win32}
    If FEllipsesStyle = esEnd Then Flags := Flags Or DT_END_ELLIPSIS
    Else If FEllipsesStyle = esPath Then Flags := Flags Or DT_PATH_ELLIPSIS;
    {$EndIf}
    If FEscapement=0 Then
      Case {$IfNDef Win32}FLayout{$Else}Layout{$EndIf} of
        tlTop:Flags := Flags Or DT_TOP;
        tlCenter:Flags := Flags Or DT_VCENTER Or DT_SINGLELINE;
        tlBottom:Flags := Flags Or DT_BOTTOM Or DT_SINGLELINE;
      End;

    Canvas.Font := Font;

    If FEscapement in [46..134] Then  ;
    {special manipulation with shadow position is unsupported- J.B.}

    UpperColor := FColorRaise;
    LowerColor := FColorRecess;

    if FTextStyle &lt;&gt; tsNone then
    begin
      TmpRect := Rect;
      If FTextStyle &lt;&gt; tsShadow Then OffsetRect(TmpRect,1,1)
      Else OffsetRect(TmpRect,FShift,FShift);
      Case FTextStyle of
        tsRecessed: Canvas.Font.Color := UpperColor;
        tsHeavyRecessed: Canvas.Font.Color := UpperColor;
        tsRaised: Canvas.Font.Color := LowerColor;
        tsLightRaised: Canvas.Font.Color := LowerColor;
        tsShadow: Canvas.Font.Color := LowerColor;
      End;
      if fEscapement &lt;&gt; 0 then
        DrawAngleText(Canvas,TmpRect,fEscapement,Text)
      else
        DrawText(Canvas.Handle,{$IFDEF WIN32}pChar(Text){$ELSE}cStr{$ENDIF},Length(Text),TmpRect,Flags);

      if FTextStyle in [tsHeavyRecessed,tsLightRaised] then
      begin
        TmpRect := Rect;
        OffsetRect(TmpRect,-1,-1);
        Case FTextStyle of
          tsHeavyRecessed: Canvas.Font.Color := LowerColor;
          tsLightRaised: Canvas.Font.Color := UpperColor;
        End;
        if fEscapement &lt;&gt; 0 then
          DrawAngleText(Canvas,TmpRect,fEscapement,Text)
        else
          DrawText(Canvas.Handle,{$IFDEF WIN32}pChar(Text){$ELSE}cStr{$ENDIF},Length(Text),TmpRect,Flags);
      end
    end;
    Canvas.Font.Color := Font.Color;
    if not Enabled then Canvas.Font.Color := clGrayText;
    {main color on font is upper}
    if fEscapement &lt;&gt; 0 then
      DrawAngleText(Canvas,Rect,fEscapement,Text)
    else
      DrawText(Canvas.Handle,{$IFDEF WIN32}pChar(Text){$ELSE}cStr{$ENDIF},Length(Text),Rect,Flags);
end;
</code></pre>
<p>Würd mich freuen wenn jemand soviel Ahnung von hat und den Fehler sieht. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1235602</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1235602</guid><dc:creator><![CDATA[Labler]]></dc:creator><pubDate>Mon, 26 Feb 2007 09:00:39 GMT</pubDate></item></channel></rss>