<?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[FindWindow und Edit]]></title><description><![CDATA[<p>Nabend Leute,<br />
ich habe ein paar Probleme mit FindWindow und einen Editfeld. Ich möchte aus meinen Programm einen Text an ein java Programm senden. Der Text soll im JavaProgramm im Editfeld erscheinen. Habe hier schon angefangen und komme aber nicht mehr weiter. Das Problem ist das der text nicht ans Edit feld gesendet wird sondern an die Titelleiste wo das minimieren usw ist.<br />
Hier mal mein Code:</p>
<pre><code class="language-cpp">HWND hWnd = ::FindWindow(&quot;J&quot;,NULL);
    if (hWnd)
   {
        SetForegroundWindow(hWnd);
        ShowWindow(hWnd,SW_NORMAL);

        String text = &quot;Hallo&quot;;
        FindWindowEx(hWnd,0,&quot;Edit&quot;,NULL);
        SendMessage(hWnd,WM_SETTEXT,0,(LPARAM)(LPCTSTR)text.c_str());

    PostMessage(hWnd,WM_KEYDOWN,VK_RETURN,0);
   }
</code></pre>
<p>MFG Fregger</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122708/findwindow-und-edit</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 20:20:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122708.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Oct 2005 00:36:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 01:01:34 GMT]]></title><description><![CDATA[<p>Nabend Leute,<br />
ich habe ein paar Probleme mit FindWindow und einen Editfeld. Ich möchte aus meinen Programm einen Text an ein java Programm senden. Der Text soll im JavaProgramm im Editfeld erscheinen. Habe hier schon angefangen und komme aber nicht mehr weiter. Das Problem ist das der text nicht ans Edit feld gesendet wird sondern an die Titelleiste wo das minimieren usw ist.<br />
Hier mal mein Code:</p>
<pre><code class="language-cpp">HWND hWnd = ::FindWindow(&quot;J&quot;,NULL);
    if (hWnd)
   {
        SetForegroundWindow(hWnd);
        ShowWindow(hWnd,SW_NORMAL);

        String text = &quot;Hallo&quot;;
        FindWindowEx(hWnd,0,&quot;Edit&quot;,NULL);
        SendMessage(hWnd,WM_SETTEXT,0,(LPARAM)(LPCTSTR)text.c_str());

    PostMessage(hWnd,WM_KEYDOWN,VK_RETURN,0);
   }
</code></pre>
<p>MFG Fregger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/887985</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/887985</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 01:01:34 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 04:54:23 GMT]]></title><description><![CDATA[<p>Wie wär's denn, wenn du den <strong>Rückgabewert</strong> von FindWindowEx benutzt? Sonst bringt der Aufruf nichts. <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/887994</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/887994</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 09 Oct 2005 04:54:23 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 05:38:06 GMT]]></title><description><![CDATA[<p>hi,<br />
was meinst du denn genau, habe mit FindWindow noch nie gearbeitet.</p>
<p>Mein vorhaben ist es ein kleinen Bot zu proggen für nen Java Chat der alle 60 eine Eingabe an den Chat senden soll. Nur bekomm ich nicht Das Richtige Handle von dem Chat und dem Editfeld heraus. Gibt es noch ne andere Möglichkeit den Text ins Editfeld zu bringen? Es geht um den Chat <a href="http://knuddels.de" rel="nofollow">knuddels.de</a>!</p>
<p>Hab hier nochmal meinen Code überarbeitet:</p>
<pre><code>String Channel = &quot; Channel: &quot;+Edit6-&gt;Text;
        HWND hWnd = FindWindow(0, Channel.c_str());
        if (hWnd)
        {
          SetForegroundWindow(hWnd);
          ShowWindow(hWnd,SW_NORMAL);
          HWND zw = FindWindowEx(hWnd,0,&quot;edit&quot;,0);
          SendMessage(zw,WM_SETTEXT, 0, (LPARAM)&quot;Der Text&quot;);
          PostMessage(hWnd,WM_KEYDOWN,VK_RETURN,0);
        }
</code></pre>
<p>MFG Fregger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/887995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/887995</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 05:38:06 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 06:08:24 GMT]]></title><description><![CDATA[<p>Fregger schrieb:</p>
<blockquote>
<p>was meinst du denn genau, habe mit FindWindow noch nie gearbeitet.</p>
</blockquote>
<p>Aber mit Funktionen, die etwas zurückgeben, oder? Egal, im Code scheint's ja jetzt richtig zu sein.</p>
<p>Hast du geprüft, ob das Eingabefeld in dem Javaprogramm überhaupt ein echtes Windows-Fenster ist? Gerade bei Java ist das nicht sicher.</p>
<p>Klappt das mit der Eingabetaste? Falls ja, könntest du die einzelnen Tastenereignisse schicken. Oder, falls der Chat mit der Zwischenablage arbeiten kann, den Text da reinkopieren und ein Strg-V hinschicken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/887996</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/887996</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 09 Oct 2005 06:08:24 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 06:19:05 GMT]]></title><description><![CDATA[<p>Hi,<br />
bin mir nicht sicher ob es ein Richtiges WindowsFenster ist, sieht aber so aus.<br />
Das mit der Eingabetaste Klappt. Die Idee mit der zwischenablage hört sich gut an, muss es mal ausproier. Danke für deine Tipps <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/887998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/887998</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 06:19:05 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 06:39:25 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=437" rel="nofollow">Jansen</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/888000</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888000</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 09 Oct 2005 06:39:25 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 06:57:22 GMT]]></title><description><![CDATA[<p>Moin,</p>
<p>habs jetzt endlich so hinbekommen, aber es gibt noch ein Problem, dass Editfeld verliert manchmal sein Focus und somit kannd er text dann nicht abgesendet werden. hat jemand eine ahnung wie ich da wieder den Focus hinbekomme?</p>
<p>Hier nochmal komplett:</p>
<pre><code class="language-cpp">String Channel = &quot; Channel: &quot;+Edit6-&gt;Text;
        HWND hWnd = FindWindow(0, Channel.c_str());
        if (hWnd)
        {
        SetForegroundWindow(hWnd);
        ShowWindow(hWnd,SW_NORMAL);

        keybd_event(VK_CONTROL, 0, 0, NULL);  //  Strg drücken
        keybd_event(0x56, 0, 0, NULL);   //  v drücken
        keybd_event(0x56, 0, KEYEVENTF_KEYUP, 0); // v loslassen
        keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); // strg loslassen
        Sleep(500);

        PostMessage(hWnd,WM_KEYDOWN,VK_RETURN,0);
        }
</code></pre>
<p>MFG Fregger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888001</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888001</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 06:57:22 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 11:16:56 GMT]]></title><description><![CDATA[<p>SetFocus mit deinem Fensterhandle?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888085</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 09 Oct 2005 11:16:56 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 13:09:24 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>nein nicht in meinem Programm sondern im Chat. Kann ich da nicht den Focus ans Editfeld schicken? Also wie oben beschrieben verliert das Editfeld im chat nach einer gewissen Zeit sein Focus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>MFG Fregger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888171</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888171</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 13:09:24 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 14:20:51 GMT]]></title><description><![CDATA[<p>Fregger schrieb:</p>
<blockquote>
<p>nein nicht in meinem Programm sondern im Chat.</p>
</blockquote>
<p>Mit &quot;deinem&quot; Fensterhandle meinte ich schon das Handle auf das Eingabefeld des Chats...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888212</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888212</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 09 Oct 2005 14:20:51 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 14:54:30 GMT]]></title><description><![CDATA[<p>Das handle kenne ich ja nicht, wie bekomm ich den raus welche Componente sich bei knuddels befinden. Hab schon mit EnumChildWindows Probiert jedoch klappt das auch nicht!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888232</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 14:54:30 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 15:14:22 GMT]]></title><description><![CDATA[<p>Schau dir mal Abschnitt 5.6 der knuddels.de-AGB an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888247</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Sun, 09 Oct 2005 15:14:22 GMT</pubDate></item><item><title><![CDATA[Reply to FindWindow und Edit on Sun, 09 Oct 2005 15:28:04 GMT]]></title><description><![CDATA[<p>Naja ich werds trotzdem weiter versuchen, ist ja nur um mich in so was einzuüben um in andere Fenster zuzugreifen aber naja danke für deine Hilfe!</p>
<p>MFG Fregger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888260</guid><dc:creator><![CDATA[Fregger]]></dc:creator><pubDate>Sun, 09 Oct 2005 15:28:04 GMT</pubDate></item></channel></rss>