<?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[RichEdit Caret position]]></title><description><![CDATA[<p>Hallo an alle...</p>
<p>Ich habe gerade ein wenig vor, und arbeite mit einem RichEdit...<br />
Ich möchte nun von meinem gesubclassten RichEdit die aktuelle caretposition...</p>
<p>Also habe ich mit Winspector geschaut was mein RichEdit für Messages bekommt wenn etwas gedrückt wird.. gar nichts!<br />
Naja gar nichts ist nicht richtig:</p>
<pre><code class="language-cpp">case WM_CHAR:
	printf( &quot;LW%d, HW%d, LL%d, HL%d\n&quot;, LOWORD(wParam), HIWORD(wParam), LOWORD(lParam), HIWORD(lParam) );
break;
</code></pre>
<p>ergibt:</p>
<pre><code>LW115, HW0, LL1, HL31
LW100, HW0, LL1, HL32
LW115, HW0, LL1, HL31
LW115, HW0, LL1, HL31
LW100, HW0, LL1, HL32
LW102, HW0, LL1, HL33
LW115, HW0, LL1, HL31
LW100, HW0, LL1, HL32
LW100, HW0, LL1, HL32
</code></pre>
<p>sieht so aus als würde der LOWORD(WPARAM) immer den Dezimalwert vom Buchstaben in der ASCII tabelle haben...<br />
HIWORD(LPARAM) beinhaltet wohl eine RichEdit-interne Tastaturverwaltung oder ist das der ANSI code?</p>
<p>Naja wie auch immer... Ich müsste halt an die Position kommen <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>Weiß da jemand was, währe supe.</p>
<p>Danke im voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/213810/richedit-caret-position</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 16:56:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213810.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 May 2008 11:52:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RichEdit Caret position on Thu, 22 May 2008 11:52:25 GMT]]></title><description><![CDATA[<p>Hallo an alle...</p>
<p>Ich habe gerade ein wenig vor, und arbeite mit einem RichEdit...<br />
Ich möchte nun von meinem gesubclassten RichEdit die aktuelle caretposition...</p>
<p>Also habe ich mit Winspector geschaut was mein RichEdit für Messages bekommt wenn etwas gedrückt wird.. gar nichts!<br />
Naja gar nichts ist nicht richtig:</p>
<pre><code class="language-cpp">case WM_CHAR:
	printf( &quot;LW%d, HW%d, LL%d, HL%d\n&quot;, LOWORD(wParam), HIWORD(wParam), LOWORD(lParam), HIWORD(lParam) );
break;
</code></pre>
<p>ergibt:</p>
<pre><code>LW115, HW0, LL1, HL31
LW100, HW0, LL1, HL32
LW115, HW0, LL1, HL31
LW115, HW0, LL1, HL31
LW100, HW0, LL1, HL32
LW102, HW0, LL1, HL33
LW115, HW0, LL1, HL31
LW100, HW0, LL1, HL32
LW100, HW0, LL1, HL32
</code></pre>
<p>sieht so aus als würde der LOWORD(WPARAM) immer den Dezimalwert vom Buchstaben in der ASCII tabelle haben...<br />
HIWORD(LPARAM) beinhaltet wohl eine RichEdit-interne Tastaturverwaltung oder ist das der ANSI code?</p>
<p>Naja wie auch immer... Ich müsste halt an die Position kommen <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>Weiß da jemand was, währe supe.</p>
<p>Danke im voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1514227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1514227</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Thu, 22 May 2008 11:52:25 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Mon, 07 Jul 2008 07:11:53 GMT]]></title><description><![CDATA[<p>Sowas kann doch nicht unmöglich sein oder?<br />
Müsste ich dazu erst mein eigenes Objekt entwickeln?</p>
<p>Geht das nur über Textvergleich vor und nach dem WM_CHAR?<br />
Den Resttext quasi abgleichen...</p>
<p>Stimmt.. Das ist mal eine Idee... GetWindowText oder so ist das ne?</p>
<p>Ich meld mich xD Danke für euer schweigen (jetz wirklich... Wenn das jetzt geht, habe ich viel gelernt!)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1542274</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1542274</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 07 Jul 2008 07:11:53 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Mon, 07 Jul 2008 11:14:34 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>die Caret-Position bekommt man doch durch Senden der <em>EM_EXGETSEL</em>-Nachricht?</p>
<p>MfG,</p>
<p>Probe-Nutzer</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1542477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1542477</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Mon, 07 Jul 2008 11:14:34 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Mon, 07 Jul 2008 12:06:02 GMT]]></title><description><![CDATA[<p>Joa weiß ich nich genau, werds mal anschauen, habs jetz per GETTEXT und SETTEXT gemacht.<br />
Allerdings ist der Carret dann immer an Position 0...</p>
<p>Daher kann ich dann eventuell per EXGETSEL lösen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1542545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1542545</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 07 Jul 2008 12:06:02 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Mon, 07 Jul 2008 13:43:54 GMT]]></title><description><![CDATA[<p>Das ist nicht des Rätsels lösung...</p>
<p>Wie kann ich also die Position wissen( muss den Carret wieder zurücksetzen... )</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1542683</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1542683</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 07 Jul 2008 13:43:54 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Mon, 20 Oct 2008 13:50:34 GMT]]></title><description><![CDATA[<p>Ist zwar schon ne weile her, aber ich wollte euch den Lösungsansatz (den ihr sicher schon kennt) nicht vorenthalten:<br />
Man merke sich den rich edit text,<br />
beim nächsten KeyAuf einfach schauen an welcher position sich was verändert hat.</p>
<pre><code class="language-cpp">int i, iOld;
i = 0;
iOld = 0;

while( oldText[i] == newText[i] &amp;&amp; i &lt; sizeof(oldText))
{
 i++;
}

if( i != sizeof(oldText)-1 )
  //gefunden
</code></pre>
<p>könnte noch ein wenig falsch sein, habe den codegerade nicht da <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/1601711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601711</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 20 Oct 2008 13:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Mon, 20 Oct 2008 16:31:14 GMT]]></title><description><![CDATA[<p>Warum hast Du nicht mit EM_GETSEL die aktuelle Markierung geholt und mit EM_POSFROMCHAR dann die Position auf dem Screen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601811</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 20 Oct 2008 16:31:14 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Tue, 21 Oct 2008 07:05:53 GMT]]></title><description><![CDATA[<p>Weil ich hier gefragt habe wies geht und niemand geantwortet hat. Dann habe ich selber überlegt und kam (wieder mal) auf eine zu komplizierte Lösung <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Werde mir deine 2 Sachen nochmal ansehen. Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602012</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602012</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Tue, 21 Oct 2008 07:05:53 GMT</pubDate></item><item><title><![CDATA[Reply to RichEdit Caret position on Tue, 21 Oct 2008 07:54:29 GMT]]></title><description><![CDATA[<p>Manchmal ist es gar nicht schwer in die MSDN zu sehen und sich die Nachrichten anzusehen, die alle zur Verfügung stehen. In diesem Falle hätte ein druchsuchen der Nachrichtem die mit EM_GET... anfangen sehr schnell zum Erfolg geführt (maximal 20 Messages die relevant sind). Selbst alle EM_ Nachrichten sind höchstens 40...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602026</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 21 Oct 2008 07:54:29 GMT</pubDate></item></channel></rss>