<?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[Ausgabe einer Textdatei ein wenig verzerrt !]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich lade eine Textdatei und gebe sie auf einem RTFView aus.<br />
Das laden und anzeigen funktioniert aber die Anzeige ist etwas verzerrt :</p>
<p>So sieht es aus:</p>
<p>#####################<br />
# # # #<br />
# # ############# # #<br />
# # # # #<br />
# # ###### ###### # #<br />
# # # # # # # #<br />
# # # # ##### # # # #<br />
# # # # # # # # #<br />
# # # # ## ## # # # #<br />
# ### ### # # # # #<br />
# # # # # # #<br />
# # # # # ### ### #<br />
# # # # ## ## # # # #<br />
# # # # # # # # #<br />
# # # # ##### # # # #<br />
# # # # # # # #<br />
# # ###### ###### # #<br />
# # # # #<br />
# # ############# # #<br />
# # # #<br />
#####################</p>
<p>So sollte es aussehen:</p>
<pre><code>#####################
# #             #   #
# # ############# # #
# #        #      # #
# # ###### ###### # #
# # # #     #   # # #
# # # # ##### # # # #
# # # #    #  # # # #
# # # # ## ## # # # #
# ### ###   # # # # #
# #   #   #   #   # #
# # # # #   ### ### #
# # # # ## ## # # # #
# # # #  #    # # # #
# # # # ##### # # # #
# # #   #     # # # #
# # ###### ###### # #
# #      #        # #
# # ############# # #
#   #             # #
#####################
</code></pre>
<p>es werden alle Spaces entfernt. Ich denke es liegt an der Art un Weise wie ich die Zeichen auf dem RTF ausgebe, aber ich komm nicht drauf, ich machs nur schlimmer <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f622.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--crying_face"
      title=";("
      alt="😢"
    /> !</p>
<p>Hier ist der Code:</p>
<pre><code class="language-cpp">void CDialogFelder2Dlg::OnDateiOeffnen() 
{	
	CFile	file;								// CFileObjekt zum öffnen der Datei
    TCHAR	*str = NULL;						// Zeiger vom Typ TCHAR um Array af den Heap zu schieben ===&gt; DYNAMISCHES ARRAY
    char	strFilter[] = { &quot;txt Files (*.txt)|*.txt|All Files (*.*)|*.*||&quot; }; // Filterstring für den Windows Dialog Datei - Öffnen
    CFileDialog FileDlg(TRUE, &quot;.txt&quot;, NULL, 0, strFilter); 

    if( FileDlg.DoModal() == IDOK )						// Dialog modal anzeigen
    { 
        file.Open(FileDlg.GetFileName(), file.modeRead);// File öffnen
        str = new TCHAR[(file.GetLength())+1];			// Array auf den Heap schieben (Muss an dieser Stelle geschehen, da Grösse erst nach Öffnen ermittelbar)
		str[(file.GetLength())] = '\0';
        file.Read(str, file.GetLength());				// File lesen und Array str mit Werten füllen

		file.Close();										// File schliessen

		m_sTextFeld = str; 
		delete[]str;										// Zeiger löschen

		UpdateData(FALSE);									// Daten in TextBox anzeigen
    } 
}
</code></pre>
<p>Wäre super wenn Ihr mir helfen könntet !</p>
<p>Danke für eure Mühe !<br />
ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/189237/ausgabe-einer-textdatei-ein-wenig-verzerrt</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 21:24:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/189237.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Aug 2007 08:31:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ausgabe einer Textdatei ein wenig verzerrt ! on Fri, 10 Aug 2007 08:31:10 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich lade eine Textdatei und gebe sie auf einem RTFView aus.<br />
Das laden und anzeigen funktioniert aber die Anzeige ist etwas verzerrt :</p>
<p>So sieht es aus:</p>
<p>#####################<br />
# # # #<br />
# # ############# # #<br />
# # # # #<br />
# # ###### ###### # #<br />
# # # # # # # #<br />
# # # # ##### # # # #<br />
# # # # # # # # #<br />
# # # # ## ## # # # #<br />
# ### ### # # # # #<br />
# # # # # # #<br />
# # # # # ### ### #<br />
# # # # ## ## # # # #<br />
# # # # # # # # #<br />
# # # # ##### # # # #<br />
# # # # # # # #<br />
# # ###### ###### # #<br />
# # # # #<br />
# # ############# # #<br />
# # # #<br />
#####################</p>
<p>So sollte es aussehen:</p>
<pre><code>#####################
# #             #   #
# # ############# # #
# #        #      # #
# # ###### ###### # #
# # # #     #   # # #
# # # # ##### # # # #
# # # #    #  # # # #
# # # # ## ## # # # #
# ### ###   # # # # #
# #   #   #   #   # #
# # # # #   ### ### #
# # # # ## ## # # # #
# # # #  #    # # # #
# # # # ##### # # # #
# # #   #     # # # #
# # ###### ###### # #
# #      #        # #
# # ############# # #
#   #             # #
#####################
</code></pre>
<p>es werden alle Spaces entfernt. Ich denke es liegt an der Art un Weise wie ich die Zeichen auf dem RTF ausgebe, aber ich komm nicht drauf, ich machs nur schlimmer <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f622.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--crying_face"
      title=";("
      alt="😢"
    /> !</p>
<p>Hier ist der Code:</p>
<pre><code class="language-cpp">void CDialogFelder2Dlg::OnDateiOeffnen() 
{	
	CFile	file;								// CFileObjekt zum öffnen der Datei
    TCHAR	*str = NULL;						// Zeiger vom Typ TCHAR um Array af den Heap zu schieben ===&gt; DYNAMISCHES ARRAY
    char	strFilter[] = { &quot;txt Files (*.txt)|*.txt|All Files (*.*)|*.*||&quot; }; // Filterstring für den Windows Dialog Datei - Öffnen
    CFileDialog FileDlg(TRUE, &quot;.txt&quot;, NULL, 0, strFilter); 

    if( FileDlg.DoModal() == IDOK )						// Dialog modal anzeigen
    { 
        file.Open(FileDlg.GetFileName(), file.modeRead);// File öffnen
        str = new TCHAR[(file.GetLength())+1];			// Array auf den Heap schieben (Muss an dieser Stelle geschehen, da Grösse erst nach Öffnen ermittelbar)
		str[(file.GetLength())] = '\0';
        file.Read(str, file.GetLength());				// File lesen und Array str mit Werten füllen

		file.Close();										// File schliessen

		m_sTextFeld = str; 
		delete[]str;										// Zeiger löschen

		UpdateData(FALSE);									// Daten in TextBox anzeigen
    } 
}
</code></pre>
<p>Wäre super wenn Ihr mir helfen könntet !</p>
<p>Danke für eure Mühe !<br />
ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342018</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342018</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Fri, 10 Aug 2007 08:31:10 GMT</pubDate></item><item><title><![CDATA[Reply to Ausgabe einer Textdatei ein wenig verzerrt ! on Fri, 10 Aug 2007 08:59:09 GMT]]></title><description><![CDATA[<p>Kann es sein, dass du einfach nur ne andere Schriftart nehmen musst?<br />
Versuch mal Courir New.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342036</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Fri, 10 Aug 2007 08:59:09 GMT</pubDate></item><item><title><![CDATA[Reply to Ausgabe einer Textdatei ein wenig verzerrt ! on Fri, 10 Aug 2007 09:08:25 GMT]]></title><description><![CDATA[<p>Hmmm werde ich gleich ausprobieren, mache ich das mit CHARFORMAT ?</p>
<p><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="😉"
    /><br />
ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342040</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Fri, 10 Aug 2007 09:08:25 GMT</pubDate></item><item><title><![CDATA[Reply to Ausgabe einer Textdatei ein wenig verzerrt ! on Fri, 10 Aug 2007 09:54:58 GMT]]></title><description><![CDATA[<p><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="🙂"
    /> D*A*N*K*E estartu <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>Dein Tipp wars, es klappt, ich raff zwar nicht was das Spaceweglassen mit einem anderen Font zu tun hat aber es klappt !!!</p>
<p>Danke<br />
<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="😉"
    /><br />
ShadowEater</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342080</guid><dc:creator><![CDATA[ShadowEater]]></dc:creator><pubDate>Fri, 10 Aug 2007 09:54:58 GMT</pubDate></item><item><title><![CDATA[Reply to Ausgabe einer Textdatei ein wenig verzerrt ! on Fri, 10 Aug 2007 09:57:22 GMT]]></title><description><![CDATA[<p>Kein Problem. <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>Das hängt vermutlich damit zusammen, dass der &quot;Weglassfont&quot; ein proportionaler Font war.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1342083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1342083</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Fri, 10 Aug 2007 09:57:22 GMT</pubDate></item></channel></rss>