<?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[FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage]]></title><description><![CDATA[<p>Kleine Frage an Daniel Schumann, falls er noch unter uns weilt:</p>
<blockquote>
<p>C/C++ Code:<br />
LOGFONT lf;<br />
lf.lfHeight=18;<br />
lf.lfWidth=9;<br />
lf.lfEscapement=-900;<br />
lf.lfOrientation=3;<br />
lf.lfWeight=300;<br />
lf.lfItalic=false;<br />
lf.lfUnderline=false;<br />
lf.lfStrikeOut=false;<br />
lf.lfCharSet=HANGEUL_CHARSET;<br />
lf.lfOutPrecision=OUT_TT_ONLY_PRECIS;<br />
lf.lfClipPrecision=CLIP_MASK;<br />
lf.lfQuality=PROOF_QUALITY;<br />
lf.lfPitchAndFamily=DEFAULT_PITCH;<br />
lf.lfFaceName[LF_FACESIZE]='D';<br />
hFont = CreateFontIndirect( &amp;lf);</p>
<p>das würde ich in der WM_CREATE Message machen und hFont als static HFONT und beim beenden DeleteObject(hFont); aufrufen.<br />
In der WM_PAINT Nachricht würde ich das dann noch so machen:</p>
<p>HFONT old;<br />
old=(HFONT)SelectObject(hdc,hFont);<br />
SetBkMode(hdc,TRANSPARENT);<br />
TextOut(hdc,20,10,&quot;WinAPI um 90°&quot;,13);<br />
SelectObject(hdc,old);</p>
<p>Dann ist wird alles schön Sauber hinterlassen, wie es war [img]images/smiles/icon_wink.gif[/img] und Windows ist zufrieden</p>
</blockquote>
<p>Vielen Dank dafür erstmal, aber wie bekomme ich nun meinen vertikalen<br />
Text dazu, an der Fensterkante einen Zeilenumbruch zu machen ?<br />
DrawText() mit DT_WORDBREAK funktioniert mit dem font von oben einfach nicht.<br />
Wäre toll, wenn sich auf das ausgegraben Thema nochmal einer meldet,</p>
<p>CU</p>
<p>Biff</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/76997/faq-quot-text-um-90-drehen-quot-frage</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 12:58:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/76997.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 Jun 2004 15:38:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage on Wed, 16 Jun 2004 15:38:50 GMT]]></title><description><![CDATA[<p>Kleine Frage an Daniel Schumann, falls er noch unter uns weilt:</p>
<blockquote>
<p>C/C++ Code:<br />
LOGFONT lf;<br />
lf.lfHeight=18;<br />
lf.lfWidth=9;<br />
lf.lfEscapement=-900;<br />
lf.lfOrientation=3;<br />
lf.lfWeight=300;<br />
lf.lfItalic=false;<br />
lf.lfUnderline=false;<br />
lf.lfStrikeOut=false;<br />
lf.lfCharSet=HANGEUL_CHARSET;<br />
lf.lfOutPrecision=OUT_TT_ONLY_PRECIS;<br />
lf.lfClipPrecision=CLIP_MASK;<br />
lf.lfQuality=PROOF_QUALITY;<br />
lf.lfPitchAndFamily=DEFAULT_PITCH;<br />
lf.lfFaceName[LF_FACESIZE]='D';<br />
hFont = CreateFontIndirect( &amp;lf);</p>
<p>das würde ich in der WM_CREATE Message machen und hFont als static HFONT und beim beenden DeleteObject(hFont); aufrufen.<br />
In der WM_PAINT Nachricht würde ich das dann noch so machen:</p>
<p>HFONT old;<br />
old=(HFONT)SelectObject(hdc,hFont);<br />
SetBkMode(hdc,TRANSPARENT);<br />
TextOut(hdc,20,10,&quot;WinAPI um 90°&quot;,13);<br />
SelectObject(hdc,old);</p>
<p>Dann ist wird alles schön Sauber hinterlassen, wie es war [img]images/smiles/icon_wink.gif[/img] und Windows ist zufrieden</p>
</blockquote>
<p>Vielen Dank dafür erstmal, aber wie bekomme ich nun meinen vertikalen<br />
Text dazu, an der Fensterkante einen Zeilenumbruch zu machen ?<br />
DrawText() mit DT_WORDBREAK funktioniert mit dem font von oben einfach nicht.<br />
Wäre toll, wenn sich auf das ausgegraben Thema nochmal einer meldet,</p>
<p>CU</p>
<p>Biff</p>
]]></description><link>https://www.c-plusplus.net/forum/post/541729</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/541729</guid><dc:creator><![CDATA[Biff Malibu]]></dc:creator><pubDate>Wed, 16 Jun 2004 15:38:50 GMT</pubDate></item><item><title><![CDATA[Reply to FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage on Wed, 16 Jun 2004 16:00:28 GMT]]></title><description><![CDATA[<p>Ich hab es jetzt nicht getestet, aber kann mir das nicht so recht vorstellen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
Dein RECT hast du aber schon richtig angegeben, oder <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>Ansonsten musst du dir das Ganze eben selber coden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/541748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/541748</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Wed, 16 Jun 2004 16:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage on Wed, 16 Jun 2004 17:32:43 GMT]]></title><description><![CDATA[<p>Bin noch da <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>MSDN schrieb:</p>
<blockquote>
<p>The DrawText function supports only fonts whose <strong>escapement</strong> and orientation are both zero.</p>
</blockquote>
<p>Musst dir so eine Funktion, wie flenders schon schrieb, also selber bauen. So in der Art:</p>
<pre><code class="language-cpp">void MyDrawText(HDC hdc, TCHAR *string, unsigned int TextHeight, int x, int y){
    TCHAR *nextCR;
    while(*string!='\0'){
        nextCR=StrChr(string, '\n');
        if(nextCR){
            TextOut(hdc, x, y, string, (nextCR-string)/sizeof(TCHAR));
        }
        else{//kein CR mehr im String
            TextOut(hdc, x, y, string, strlen(string));
            return;
        }
        x-=TextHeight;//evtl. +=TextHeight, je nachdem in welche Richtung gedreht wurde
        string=nextCR+1;
    }
}
</code></pre>
<p>Keine Garantie, dass es so geht, habs nicht getestet, aber so ähnlich müsste es gehen. (Ich hoffe mal die String-Funktionen unterstützen UNICODE).</p>
<p>Viel Spaß noch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/541820</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/541820</guid><dc:creator><![CDATA[D*niel *chumann]]></dc:creator><pubDate>Wed, 16 Jun 2004 17:32:43 GMT</pubDate></item><item><title><![CDATA[Reply to FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage on Wed, 16 Jun 2004 18:05:45 GMT]]></title><description><![CDATA[<p>Danke, hab ich mir irgendwie schon gedacht. Die Remarks zu DrawText() muss ich wohl überlesen haben. *schäm*<br />
Danke auch für die Codeschnipsel, da ich aber auch die einzelnen Wörter abschneiden muss, falls sie zu lang sind komme ich um GetTextExtent32() wohl nicht herum. <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="😡"
    /><br />
Allzu viel Spaß werd ich dabei wohl nicht haben, <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>CU</p>
<p>biff</p>
]]></description><link>https://www.c-plusplus.net/forum/post/541839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/541839</guid><dc:creator><![CDATA[Biff Malibu]]></dc:creator><pubDate>Wed, 16 Jun 2004 18:05:45 GMT</pubDate></item><item><title><![CDATA[Reply to FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage on Wed, 16 Jun 2004 21:41:44 GMT]]></title><description><![CDATA[<p>du könntest ja auch den Text gerade lassen und dann, natürlich mit DrawText, in ein Bitmap rendern und dieses um 90° gedreht ausgeben. Wäre evtl. ein anderer Lösungsweg, jenachdem, was dir einfacher erscheint.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/541989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/541989</guid><dc:creator><![CDATA[D*niel *chumann]]></dc:creator><pubDate>Wed, 16 Jun 2004 21:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to FAQ &amp;quot;Text um 90° drehen&amp;quot; - Frage on Wed, 16 Jun 2004 22:31:07 GMT]]></title><description><![CDATA[<p>Mit dieser Methode würde der vertikale Text in der rechten oberen Ecke anfangen und nach links hin umbrechen. Er will aber vermutlich, dass der Text links oben anfängt und nach rechts hin umbricht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/542005</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/542005</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Wed, 16 Jun 2004 22:31:07 GMT</pubDate></item></channel></rss>