<?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[Text über Tastatur ausgeben]]></title><description><![CDATA[<p>Folgendes brauche ich:</p>
<p>ich habe Textfeld in dem ich einen Text eingebe. Dieser ist logischerweise veränderbar.</p>
<p>Wenn ich dort nun das Wort Hallo eingebe, soll das Wort Hallo über Keyevents ausgegeben werden. Also Taste H, A, L, L, O. Wie geagt. Im Textfeld kann auch was anderes stehen.</p>
<p>Ich weiss das es mit dem Clipboard einfacher geht, Kann diese Funktion aber nicht gebrauchen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/154739/text-über-tastatur-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 19:49:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/154739.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 Jul 2006 09:32:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Sun, 30 Jul 2006 09:32:51 GMT]]></title><description><![CDATA[<p>Folgendes brauche ich:</p>
<p>ich habe Textfeld in dem ich einen Text eingebe. Dieser ist logischerweise veränderbar.</p>
<p>Wenn ich dort nun das Wort Hallo eingebe, soll das Wort Hallo über Keyevents ausgegeben werden. Also Taste H, A, L, L, O. Wie geagt. Im Textfeld kann auch was anderes stehen.</p>
<p>Ich weiss das es mit dem Clipboard einfacher geht, Kann diese Funktion aber nicht gebrauchen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107010</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 30 Jul 2006 09:32:51 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Sun, 30 Jul 2006 09:52:24 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int nChar = 0;
CString strText; // strText ist der String zughörig zum Textfeld.
for(int i = 0; i &lt; strText.GetLength(); ++i)
{
    nChar = static_cast&lt;int&gt;(strText.GetAt(i));

    PostMessage(WM_CHAR, nChar, 0);
    // oder
    SendMessage(WM_CHAR, nChar, 0);
    // oder
    ::PostMessage(NULL, WM_CHAR, nChar, 0);
    // oder
    ::SendMessage(m_hWnd, WM_CHAR, nChar, 0);
    // oder wie bzw. an was auch immer du die Nachricht senden willst
}
</code></pre>
<p>Hoffe konnte dir helfen.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107020</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107020</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sun, 30 Jul 2006 09:52:24 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Sun, 30 Jul 2006 10:56:24 GMT]]></title><description><![CDATA[<p>Firefighter2000 schrieb:</p>
<blockquote>
<p>Folgendes brauche ich:</p>
<p>ich habe Textfeld in dem ich einen Text eingebe.</p>
</blockquote>
<p>Ey man ey wo hätte gedacht dass Textfeld ist legal? Wo hätte gedacht<br />
dass da Text rein? Ich habe Döner!</p>
<p>Firefighter2000 schrieb:</p>
<blockquote>
<p>Wie geagt. Im Textfeld kann auch was anderes stehen.</p>
</blockquote>
<p>Ja ey man ich finde das auch agge ey, voll ey. Aber dafür habe ich anti<br />
agging, ey!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107049</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107049</guid><dc:creator><![CDATA[AYTIKIN HAKANS BRUDET]]></dc:creator><pubDate>Sun, 30 Jul 2006 10:56:24 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Sun, 30 Jul 2006 19:28:43 GMT]]></title><description><![CDATA[<p>Glaube ich hab mich schlecht ausgedrückt.</p>
<p>Also nochmal.</p>
<p>Ich habe ein Textfeld. In dem steht z.B. Hallo.</p>
<p>nun will ich über einen Tastendruck diesen Text z.B. in Word einfügen.</p>
<pre><code>LRESULT CPHMakroPLUSPLUSDlg::OnHotKey(WPARAM wp, LPARAM lp)
{

	if (wp == m_nIDHotKey1)
	{
		UpdateData(true);

		::keybd_event(VK_SPACE, 0, 0, 0); 
		::keybd_event(VK_SPACE, 0, KEYEVENTF_KEYUP, 0);
	}

	UpdateData(false);

	return 0;
}
</code></pre>
<p>Mit VK_SPACE führe ich ja nun nur ein Space aus.<br />
Ich will aber nun, da im Textstring HALLO steht, die Tasten H, A, L, L, O simulieren. Nur wie ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107348</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107348</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 30 Jul 2006 19:28:43 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Sun, 30 Jul 2006 19:37:43 GMT]]></title><description><![CDATA[<p>Ja also... da war Draveres Vorschlag doch gut. Wenn de das Wnd von Word hast, kannst de mal Versuchen ob das klappt wenn de dem das schickst...</p>
<pre><code class="language-cpp">void SendString(CString&amp; strText, CWnd* pWnd)
{
    if (!pWnd || !pWnd-&gt;IsVisible())
        return;

    int nChar = 0;

    for(UINT i = 0; i &lt; (UINT)strText.GetLength(); ++i)
    {
        nChar = static_cast&lt;int&gt;(strText.GetAt(i));

        pWnd-&gt;PostMessage(WM_CHAR, nChar, 0);
    } 
}
</code></pre>
<blockquote>
<p><strong>Parameter:</strong><br />
strText - <em>Der Text, den das Fenster gesendet bekommen soll.</em><br />
pWnd - <em>Zeiger auf das Fenster das den Text erhalten soll.</em></p>
</blockquote>
<p><strong>Referenzen:</strong><br />
<a href="http://msdn2.microsoft.com/en-us/library/9tdesxec.aspx" rel="nofollow">CWnd::PostMessage</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107353</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 30 Jul 2006 19:37:43 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Sun, 30 Jul 2006 20:01:06 GMT]]></title><description><![CDATA[<p>Danke schon mal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107368</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107368</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 30 Jul 2006 20:01:06 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Mon, 31 Jul 2006 17:40:23 GMT]]></title><description><![CDATA[<p>Ich bekomms leider immer noch ned hin.</p>
<p>Könnte sich jemand erbarmen, und einem dummie newbie mal posten, wie der code nun auszusehen hat ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107921</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 31 Jul 2006 17:40:23 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Mon, 31 Jul 2006 18:55:52 GMT]]></title><description><![CDATA[<p>Was funktioniert denn nicht? Und was versuchst du zu machen? Zeig mal ein wenig Code, irgendwas woran wir dir helfen können.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107984</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Mon, 31 Jul 2006 18:55:52 GMT</pubDate></item><item><title><![CDATA[Reply to Text über Tastatur ausgeben on Mon, 31 Jul 2006 19:46:53 GMT]]></title><description><![CDATA[<p>Hmm... Guck dir mit einem Programm deiner Wahl an, wie der Classname des Textwindows von Word ist... und dann noch evt. den namen... dann suchst de erstmal mit FindWindow das Word-Fenster und dann mit FindWindowEx das Childtextwindow... wo ist das Problem? Das gibst de dann als pWnd bei SendString an... strText ist der Text der dort erscheinen soll...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1108013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1108013</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 31 Jul 2006 19:46:53 GMT</pubDate></item></channel></rss>