<?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[Zeile aus RichEdit lesen]]></title><description><![CDATA[<p>Hi, ich möchte die Zeile, in der sich der Cursor befindet (blinkding) einlesen, und ggf etwas damit anfangen, aber irgendwie liest der nur mist...</p>
<p>Zum testen, möchte ich einfach mal die Eingelesene zeile in eine txt ausgeben, aber es werden nur Leerzeichen ausgegeben <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>
<pre><code class="language-cpp">//Aktuelle Position: Var erstellen und aus Controll holen
       static CHARRANGE crCurrent;
       SendMessage(hwnd, EM_GETSEL, (LPARAM)&amp;crCurrent.cpMin, (WPARAM)&amp;crCurrent.cpMax);

       //Aktuelle Zeilennummer holen:
       long Line = (long)SendMessage(hwnd, EM_LINEFROMCHAR, crCurrent.cpMax, 0);
       //Globalen Wert für Zeilenbeginn holen:
       long LineBegin =(long) SendMessage(hwnd, EM_LINEINDEX, Line, 0);
       //Länge der Zeile holen:
       int LineLength =(int) SendMessage(hwnd, EM_LINELENGTH, LineBegin, 0);

       //Komplette erste Zeile einlesen:
       char* LineBuffer = new char[LineLength+2];

        SendMessage(hwnd, EM_GETLINE, Line, (LPARAM)LineBuffer);
       //SendMessage(hwnd, EM_GETLINE, Line, (LPARAM)LineBuffer);

        OemToChar(LineBuffer/*in*/, LineBuffer/*out*/); //Ohne ist alles nich schlimmer

       //Einfach mal so zum Testen
       ofstream out;
       out.open(&quot;.\\debug.txt&quot;,ios::app);
       out &lt;&lt; LineBuffer &lt;&lt; endl;
       out.close();
</code></pre>
<p>Was ist hier falsch??</p>
<p>UND:<br />
Wenn ich bei Google:</p>
<p><em>richedit -Delphi -VB -Assembly -Borland -Pascal -MFC</em></p>
<p>eingebe, bekomme ich keine seiten, in der Sowas in C++ Beschrieben ist, nur in sämtlichen anderen Sprachen, die ich nicht ausgeschlossen habe (PHP, Basic, ...) Und seiten, mit einer Nicht leserlichen sprache (Japanisch, Fanzösich,...)</p>
<p>=&gt; Wonach muss ich suchen, wenn ich Informationen/Tutorials uber Das Richedit-feld haben möchte??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/109150/zeile-aus-richedit-lesen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 15:28:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/109150.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 May 2005 08:15:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 08:15:58 GMT]]></title><description><![CDATA[<p>Hi, ich möchte die Zeile, in der sich der Cursor befindet (blinkding) einlesen, und ggf etwas damit anfangen, aber irgendwie liest der nur mist...</p>
<p>Zum testen, möchte ich einfach mal die Eingelesene zeile in eine txt ausgeben, aber es werden nur Leerzeichen ausgegeben <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>
<pre><code class="language-cpp">//Aktuelle Position: Var erstellen und aus Controll holen
       static CHARRANGE crCurrent;
       SendMessage(hwnd, EM_GETSEL, (LPARAM)&amp;crCurrent.cpMin, (WPARAM)&amp;crCurrent.cpMax);

       //Aktuelle Zeilennummer holen:
       long Line = (long)SendMessage(hwnd, EM_LINEFROMCHAR, crCurrent.cpMax, 0);
       //Globalen Wert für Zeilenbeginn holen:
       long LineBegin =(long) SendMessage(hwnd, EM_LINEINDEX, Line, 0);
       //Länge der Zeile holen:
       int LineLength =(int) SendMessage(hwnd, EM_LINELENGTH, LineBegin, 0);

       //Komplette erste Zeile einlesen:
       char* LineBuffer = new char[LineLength+2];

        SendMessage(hwnd, EM_GETLINE, Line, (LPARAM)LineBuffer);
       //SendMessage(hwnd, EM_GETLINE, Line, (LPARAM)LineBuffer);

        OemToChar(LineBuffer/*in*/, LineBuffer/*out*/); //Ohne ist alles nich schlimmer

       //Einfach mal so zum Testen
       ofstream out;
       out.open(&quot;.\\debug.txt&quot;,ios::app);
       out &lt;&lt; LineBuffer &lt;&lt; endl;
       out.close();
</code></pre>
<p>Was ist hier falsch??</p>
<p>UND:<br />
Wenn ich bei Google:</p>
<p><em>richedit -Delphi -VB -Assembly -Borland -Pascal -MFC</em></p>
<p>eingebe, bekomme ich keine seiten, in der Sowas in C++ Beschrieben ist, nur in sämtlichen anderen Sprachen, die ich nicht ausgeschlossen habe (PHP, Basic, ...) Und seiten, mit einer Nicht leserlichen sprache (Japanisch, Fanzösich,...)</p>
<p>=&gt; Wonach muss ich suchen, wenn ich Informationen/Tutorials uber Das Richedit-feld haben möchte??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783264</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 07 May 2005 08:15:58 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 09:00:14 GMT]]></title><description><![CDATA[<p>Informationen zum RichEdit solltest du meines Wissens in der SDK finden.</p>
<p>Gruß Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783287</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783287</guid><dc:creator><![CDATA[Alex_H]]></dc:creator><pubDate>Sat, 07 May 2005 09:00:14 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 09:14:43 GMT]]></title><description><![CDATA[<p>SDK?? Was'n das??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783297</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783297</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 07 May 2005 09:14:43 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 10:11:44 GMT]]></title><description><![CDATA[<p>Ich zitiere aus der SDK<br />
&quot;Software Development Kit (SDK) documentation. This documentation provides information about the application programming interfaces (API) supported by Microsoft<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/00ae.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--registered"
      title=":registered:"
      alt="®"
    /> Windows<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/00ae.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--registered"
      title=":registered:"
      alt="®"
    />.&quot;<br />
Du findest eine Link im WINAPI Forum ganz oben &quot;Bevor du hier postest:&quot;....</p>
<p>Oder nimm den hier:<br />
<a href="http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm" rel="nofollow">http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm</a></p>
<p>Gruß<br />
Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783329</guid><dc:creator><![CDATA[Alex_H]]></dc:creator><pubDate>Sat, 07 May 2005 10:11:44 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 10:31:06 GMT]]></title><description><![CDATA[<p><em>&quot;# Click each PSDK-FULL .cab file to save it. Save all .cab files to a temporary directory with at least 266 MB free space (for example, c:\psdktemp).&quot;</em><br />
Nur weil ich 'n' kleines Problem mit nem RichEdit Control hab, soll ich 270 MB runterladen?!?!?!<br />
<em># Run Psdk-full.bat to extract the full image from the .cab files. Specify an install directory with at least 1.4 GB free space.&quot;</em></p>
<p>Das währen<br />
ca 1 Stunde Download<br />
ca 1,5 Stunden Installation<br />
---------------<br />
ca 2,5 Stunden, um nachzusehen, wie ich ne scheiß zeile aus dem Ding rausbekomme!?!</p>
<p>Außerdem ist es in Englisch. d.h. ich könnte zwar an meine Infos kommen, aber so richtig verstehen würde ich's nicht<br />
Und dann den Ganzen mist wieder Löschen??</p>
<p>Gibts da nicht andere Möglichkeiten??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783341</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 07 May 2005 10:31:06 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 10:33:52 GMT]]></title><description><![CDATA[<p>Ohne aktuelles PlatformSDK wirst Du noch bei weiteren Funktionen an Deine Grenzen stoßen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783343</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783343</guid><dc:creator><![CDATA[PlatformSDK]]></dc:creator><pubDate>Sat, 07 May 2005 10:33:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 10:41:34 GMT]]></title><description><![CDATA[<p>Muss ich alle *.cab Datein runterladen, oder reicht &quot;PSDK-FULL.1&quot;??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783348</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783348</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 07 May 2005 10:41:34 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 10:51:16 GMT]]></title><description><![CDATA[<p>Englischnachhilfe: <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 />
2.Click each PSDK-FULL .cab file to save it.<br />
each - jede</p>
<p>Du mußt wohl alle runterladen. Die 1,4 GB kann ich nicht bestätigen bei mir 550 MB.<br />
Ich muß immer wieder reinschauen, und auch ich stehe mit der englichen Sprache auf Kriegsfuß.<br />
Mir hilft nur eins: Nochmal und Nochmal lesen zudem habe ich als Wörterbuch QuickDic installiert (frei erhältlich).<br />
Ich versuche mich halt mit der Sprache vertraut zu machen da es ohne halt nicht geht.</p>
<p>Gruß Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783357</guid><dc:creator><![CDATA[Alex_H]]></dc:creator><pubDate>Sat, 07 May 2005 10:51:16 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 12:45:26 GMT]]></title><description><![CDATA[<p>Ok, und wonach muss ich suchen??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783425</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 07 May 2005 12:45:26 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 14:06:25 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/783468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783468</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 07 May 2005 14:06:25 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 14:24:58 GMT]]></title><description><![CDATA[<p>Genau oder in der SDK nach Rich Edit, da stößt Du dann auch auf die &quot;Rich Edit Conrols&quot;.</p>
<p>Gruß<br />
Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783475</guid><dc:creator><![CDATA[Alex_H]]></dc:creator><pubDate>Sat, 07 May 2005 14:24:58 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Sat, 07 May 2005 15:21:58 GMT]]></title><description><![CDATA[<p>Das was in der MSDN steht, wusste ich ja schon.<br />
Und das aus der SDK ist auch nicht viel mehr...</p>
<p>So wie das da beschrieben ist, müsste es ja Funktionieren, mein Problem ist aber, das es SO NICHT funktioniert, und ich auch nicht genau weis, wo das Problem bei (meinem) code ist, da halt alles so ist, wie es sein müsste. Ich weiß nur, das es an der Stelle irgendwo nen Problem gibt, was dazu führt, das nicht die Zeichen eingelesen werden, die in dem Control stehen...<br />
-&gt; Gibts nicht nen irgendwo nen Beispielcode, mit dem ich (meinen) code vergleichen könnt??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/783507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/783507</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 07 May 2005 15:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Wed, 11 May 2005 16:38:12 GMT]]></title><description><![CDATA[<p>so, hab inzwischen nen paar Fehler beseitigt:</p>
<pre><code class="language-cpp">//Komplette erste Zeile einlesen:
 char* LineBuffer = new char[LineLength+2];
 ZeroMemory(LineBuffer,LineLength+2);
  char LineBufferSize[10];
  itoa(LineLength+2, LineBufferSize, 10);
  strcpy(LineBuffer,LineBufferSize);
 SendMessage(this-&gt;RichEdithWnd,EM_GETLINE,Line,(LPARAM)LineBuffer);
</code></pre>
<p>Den code hab ich zZ immer noch bei WM_CHAR...</p>
<p>Wenn ich jetzt &quot;123&quot; eingebe, steht in dem Buffer folgendes:</p>
<pre><code>LineLength: 0
LineBegin:  0
Line:       0
LineBuffer: 

LineLength: 1
LineBegin:  0
Line:       0
LineBuffer: 1
?w???

LineLength: 2
LineBegin:  0
Line:       0
LineBuffer: 12
w???
</code></pre>
<p>Die Zahlen in LineBuffer sind genau so, wie sie sein sollten, aber was ist mit den &quot;w&quot;s und den &quot;?&quot;-Zeichen?? Wo kommen die wech??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786749</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Wed, 11 May 2005 16:38:12 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Wed, 11 May 2005 17:02:40 GMT]]></title><description><![CDATA[<p>Hi RedEagle,<br />
ich würde darauf tippen, daß dies einfach der Wert ist der im Speicher steht nachdem du diesen allociert hast. Du solltest deinen String am Schluß einfach mit NULL terminieren.</p>
<p>Gruß Alex</p>
]]></description><link>https://www.c-plusplus.net/forum/post/786764</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/786764</guid><dc:creator><![CDATA[Alex_H]]></dc:creator><pubDate>Wed, 11 May 2005 17:02:40 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Fri, 13 May 2005 10:41:03 GMT]]></title><description><![CDATA[<p>So, nach langem suchen weiß ich jetzt endlich woran es lag.<br />
Nach dem ende der zeile kam noch ein '\r' und dann dieser müll.</p>
<p>Das hab ich jetzt so behoben:</p>
<pre><code class="language-cpp">char* TempLine = new char[arraylength];
   strcpy(TempLine,LineBuffer);
   ZeroMemory(LineBuffer,arraylength);
   for(int i=0; TempLine[i]!='\r'; i++) LineBuffer[i]=TempLine[i];
 delete[] TempLine;
</code></pre>
<p>gibts da auch ne &quot;schönere&quot; lösung für??<br />
Also um bis zum '\r' beizubehalten, und den rest löschen??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787839</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Fri, 13 May 2005 10:41:03 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Fri, 13 May 2005 12:17:13 GMT]]></title><description><![CDATA[<p>RedEagle schrieb:</p>
<blockquote>
<p>gibts da auch ne &quot;schönere&quot; lösung für??<br />
Also um bis zum '\r' beizubehalten, und den rest löschen??</p>
</blockquote>
<p>So sollte das eigentlich auch funktionieren:</p>
<pre><code class="language-cpp">*(strchr(LineBuffer,'\r')) = 0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/787900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787900</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 13 May 2005 12:17:13 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile aus RichEdit lesen on Fri, 13 May 2005 12:50:17 GMT]]></title><description><![CDATA[<p>danke, aber irgendwie brauchte ich das nur, solange ich in der Funktion ofstream verwendet habe, als ich die sachen rausgenommen habe, war aufmal kein \r mehr da...<br />
jedenfals läuft jetzt alles,</p>
<p>DANKE</p>
]]></description><link>https://www.c-plusplus.net/forum/post/787929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/787929</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Fri, 13 May 2005 12:50:17 GMT</pubDate></item></channel></rss>