<?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[Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler?]]></title><description><![CDATA[<p>Hallo<br />
Ich benutze folgenden Quellcode um an die Textdatei Test ein E zu schicken<br />
Das mach ich mit folgenden Quellcode:<br />
#include&lt;windows.h&gt;<br />
#include&lt;iostream&gt;<br />
using namespace std;</p>
<p>int main()</p>
<p>{<br />
SetWindowText ( FindWindow(0,&quot;Test - Editor&quot;),&quot;TEST&quot;);<br />
Sleep(5000);<br />
HWND hWnd=FindWindow(NULL,&quot;TEST&quot;);<br />
PostMessage(hWnd, WM_KEYDOWN,0x45,0x45);<br />
PostMessage(hWnd, WM_KEYUP,0x45,0x45);<br />
}</p>
<p>Der funktioniert leider nicht<br />
Die Datei wird in TEST umbenannt aber es wird kein E gesendet<br />
Weiss jemand was dadran falsch ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/162753/tasten-an-datei-schicken-funktioniert-nicht-wo-liegt-der-fehler</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 17:26:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/162753.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Oct 2006 23:06:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Sun, 22 Oct 2006 23:06:08 GMT]]></title><description><![CDATA[<p>Hallo<br />
Ich benutze folgenden Quellcode um an die Textdatei Test ein E zu schicken<br />
Das mach ich mit folgenden Quellcode:<br />
#include&lt;windows.h&gt;<br />
#include&lt;iostream&gt;<br />
using namespace std;</p>
<p>int main()</p>
<p>{<br />
SetWindowText ( FindWindow(0,&quot;Test - Editor&quot;),&quot;TEST&quot;);<br />
Sleep(5000);<br />
HWND hWnd=FindWindow(NULL,&quot;TEST&quot;);<br />
PostMessage(hWnd, WM_KEYDOWN,0x45,0x45);<br />
PostMessage(hWnd, WM_KEYUP,0x45,0x45);<br />
}</p>
<p>Der funktioniert leider nicht<br />
Die Datei wird in TEST umbenannt aber es wird kein E gesendet<br />
Weiss jemand was dadran falsch ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159254</guid><dc:creator><![CDATA[gdsfgdhf]]></dc:creator><pubDate>Sun, 22 Oct 2006 23:06:08 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Mon, 23 Oct 2006 10:55:12 GMT]]></title><description><![CDATA[<p>Tastatureingaben lassen sich so nicht simulieren.<br />
Verwende SendInput!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159417</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 23 Oct 2006 10:55:12 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Mon, 23 Oct 2006 11:30:12 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<p>Tastatureingaben lassen sich so nicht simulieren.</p>
</blockquote>
<p>Kann man so nicht sagen... Das Textfeld im Editor ist ein Edit-Feld und dem kannste ne WM_CHAR-Nachricht schicken. Darauf müsste es eigentlich reagieren. Inwiefern man damit ne Tastatureingabe simuliert, ist fraglich, aber dem Editor wird auf jeden Fall vorgegauckelt, dass ne Taste gedrückt wurde...</p>
<p>@gdsggsfsd:<br />
Das Edit-Feld findest du mit FindWindowEx, Childklasse ist &quot;EDIT&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159448</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159448</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Mon, 23 Oct 2006 11:30:12 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Mon, 23 Oct 2006 13:27:57 GMT]]></title><description><![CDATA[<p>Wie macht man das mit Sendinput?<br />
Bin aus Msdn leider nicht schlau geworden<br />
Kann mir jemand ne Funktion geben die Beispielweise mit Sendinput &quot;E&quot; drückt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159566</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159566</guid><dc:creator><![CDATA[dsfgfdhg]]></dc:creator><pubDate>Mon, 23 Oct 2006 13:27:57 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Sat, 28 Oct 2006 12:52:21 GMT]]></title><description><![CDATA[<p>mhh</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163049</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163049</guid><dc:creator><![CDATA[f gjghkmhjbkj.]]></dc:creator><pubDate>Sat, 28 Oct 2006 12:52:21 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Sat, 28 Oct 2006 13:06:20 GMT]]></title><description><![CDATA[<p>Tasten + Umschlag + Briefmarke + Adresse der Datei -&gt; In den Briefkasten<br />
Den Rest macht die Post</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163058</guid><dc:creator><![CDATA[Erklärbär]]></dc:creator><pubDate>Sat, 28 Oct 2006 13:06:20 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Sun, 29 Oct 2006 09:02:16 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">KEYBDINPUT kbinput;
INPUT      input;

input.type = INPUT_KEYBOARD;
input.ki.wVk = //... füll die ganze ki struct aus ... s. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputstructures/keybdinput.asp
SendInput(1, &amp;input, int cbSize);
</code></pre>
<p>aja und dein Code:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;iostream&gt;

int main()
{
    ::HWND hEditorWnd = ::FindWindow(0, _T(&quot;Test - Editor&quot;));
    if (hEditorWnd == NULL)
        return -1;

    ::HWND hEditorEditWnd = ::FindWindowEx(hEditorWnd, NULL, _T(&quot;Edit&quot;), NULL);
    if (hEditorEditWnd == NULL)
        return -1;

    ::SendMessage(WM_CHAR, // füll das selber aus!
    std::cout &lt;&lt; &quot;Send WM_CHAR!&quot; &lt;&lt; std::endl;

    return 0;
}
</code></pre>
<p><strong>Referenzen:</strong><br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/findwindowex.asp" rel="nofollow">FindWindowEx</a><br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/findwindow.asp" rel="nofollow">FindWindow</a><br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputmessages/wm_char.asp" rel="nofollow">WM_CHAR</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163549</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 29 Oct 2006 09:02:16 GMT</pubDate></item><item><title><![CDATA[Reply to Tasten an Datei schicken funktioniert nicht.Wo liegt der Fehler? on Sun, 29 Oct 2006 09:07:45 GMT]]></title><description><![CDATA[<p>Erklärbär schrieb:</p>
<blockquote>
<p>Tasten + Umschlag + Briefmarke + Adresse der Datei -&gt; In den Briefkasten<br />
Den Rest macht die Post</p>
</blockquote>
<p>danke sehr</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163554</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163554</guid><dc:creator><![CDATA[gdsfgdhf]]></dc:creator><pubDate>Sun, 29 Oct 2006 09:07:45 GMT</pubDate></item></channel></rss>