<?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[Zeilenumbruch ExtTextOut]]></title><description><![CDATA[<p>ich verwende für meine Textausgabe die Funktion ExtTextOut(...)<br />
nun würde ich jedoch auch gerne 2 oder mehrzeiligen Text ausgeben.</p>
<p>ist die mit dieser Methode möglich oder gibt es dafür andere bessere. welches Zeichen dient als Zeilenumbruch (\n ??)</p>
<p>hab einen workaround gemacht und parse den String jetzt immer auf \n und ruf dann ExtTextOut mit verändertem Y-Wert auf</p>
<p>Auszug aus meinem Source:</p>
<pre><code class="language-cpp">char text[GS_CAPTION_FIELD_LEN];
          strcpy(text,pgraphic-&gt;caption);
          linecaption=strtok(text,&quot;\n&quot;);

          TEXTMETRIC lptm;
          GetTextMetrics(hdc,&amp;lptm);
          int lineY=pgraphic-&gt;caption_y;

          while(linecaption)
          {          
              ExtTextOut(hdc,pgraphic-&gt;caption_x,lineY,
                     ETO_CLIPPED,NULL,linecaption,strlen(linecaption),NULL);

              linecaption=strtok(NULL,&quot;\n&quot;);
              lineY+=lptm.tmAscent+lptm.tmDescent/2;
          }
</code></pre>
<p>diese Variante ist jedoch unbrauchbar da ich dadurch enorme Performance einbusen habe und zusehen kann wie sich die einzelenen Elemente beschriften <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> .</p>
<p>hoff einer von euch hat eine bessere lösung zur hand</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/107391/zeilenumbruch-exttextout</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 00:59:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/107391.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Apr 2005 09:59:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeilenumbruch ExtTextOut on Tue, 19 Apr 2005 09:59:49 GMT]]></title><description><![CDATA[<p>ich verwende für meine Textausgabe die Funktion ExtTextOut(...)<br />
nun würde ich jedoch auch gerne 2 oder mehrzeiligen Text ausgeben.</p>
<p>ist die mit dieser Methode möglich oder gibt es dafür andere bessere. welches Zeichen dient als Zeilenumbruch (\n ??)</p>
<p>hab einen workaround gemacht und parse den String jetzt immer auf \n und ruf dann ExtTextOut mit verändertem Y-Wert auf</p>
<p>Auszug aus meinem Source:</p>
<pre><code class="language-cpp">char text[GS_CAPTION_FIELD_LEN];
          strcpy(text,pgraphic-&gt;caption);
          linecaption=strtok(text,&quot;\n&quot;);

          TEXTMETRIC lptm;
          GetTextMetrics(hdc,&amp;lptm);
          int lineY=pgraphic-&gt;caption_y;

          while(linecaption)
          {          
              ExtTextOut(hdc,pgraphic-&gt;caption_x,lineY,
                     ETO_CLIPPED,NULL,linecaption,strlen(linecaption),NULL);

              linecaption=strtok(NULL,&quot;\n&quot;);
              lineY+=lptm.tmAscent+lptm.tmDescent/2;
          }
</code></pre>
<p>diese Variante ist jedoch unbrauchbar da ich dadurch enorme Performance einbusen habe und zusehen kann wie sich die einzelenen Elemente beschriften <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> .</p>
<p>hoff einer von euch hat eine bessere lösung zur hand</p>
]]></description><link>https://www.c-plusplus.net/forum/post/770173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/770173</guid><dc:creator><![CDATA[absolute.Beginner]]></dc:creator><pubDate>Tue, 19 Apr 2005 09:59:49 GMT</pubDate></item><item><title><![CDATA[Reply to Zeilenumbruch ExtTextOut on Tue, 19 Apr 2005 10:50:02 GMT]]></title><description><![CDATA[<p>Ein Backbuffer dürfte das ganze etwas beschleunigen.<br />
Evtl. ist das was für dich:</p>
<p>Platform SDK schrieb:</p>
<blockquote>
<p>The <strong>DrawText</strong> function draws formatted text in the specified rectangle. It formats the text according to the specified method (expanding tabs, justifying characters, breaking lines, and so forth).</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/770205</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/770205</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Tue, 19 Apr 2005 10:50:02 GMT</pubDate></item></channel></rss>