<?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[Externes Fenster beenden!]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich möchte gerne ein mit ShellExecute erzeugtes Fenster wieder beenden! Hab schon viel im Forum/MSDN gelesen und bin nicht schlauer geworden! Brauche einfach nur den Code. Das zu schließende Fenster ist die Eingabeaufforderung cmd.exe plus Kommandozeilenparameter -net send IP MESSAGE wobei IP und MESSAGE Variablen sind.</p>
<p>Danke</p>
<p>P.S. Bin noch relativ Anfänger!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/73477/externes-fenster-beenden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 20:40:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/73477.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 May 2004 17:44:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Externes Fenster beenden! on Mon, 10 May 2004 17:44:53 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Ich möchte gerne ein mit ShellExecute erzeugtes Fenster wieder beenden! Hab schon viel im Forum/MSDN gelesen und bin nicht schlauer geworden! Brauche einfach nur den Code. Das zu schließende Fenster ist die Eingabeaufforderung cmd.exe plus Kommandozeilenparameter -net send IP MESSAGE wobei IP und MESSAGE Variablen sind.</p>
<p>Danke</p>
<p>P.S. Bin noch relativ Anfänger!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/517769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/517769</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Mon, 10 May 2004 17:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Mon, 10 May 2004 22:44:09 GMT]]></title><description><![CDATA[<p>besonders elegant isses nich aber du könntest alle fenster durchgehn und dir ein windowhandle auf das cmd fenster besorgen</p>
<p>danach SendMessage(WindowHandle,WM_CLOSE,0,0);</p>
<p>EnumWindows<br />
The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE.</p>
<p>CWnd::FromHandle<br />
static CWnd* PASCAL FromHandle( HWND hWnd );</p>
<p>Return Value<br />
Returns a pointer to a CWnd object when given a handle to a window. If a CWnd object is not attached to the handle, a temporary CWnd object is created and attached.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/517929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/517929</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Mon, 10 May 2004 22:44:09 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Tue, 11 May 2004 13:15:03 GMT]]></title><description><![CDATA[<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518252</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Tue, 11 May 2004 13:15:03 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Tue, 11 May 2004 13:15:43 GMT]]></title><description><![CDATA[<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/518253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/518253</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Tue, 11 May 2004 13:15:43 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Wed, 12 May 2004 20:39:56 GMT]]></title><description><![CDATA[<p>Sorry ich bekomm das nich hin kann mir da einer vielleicht nen beispiel reinschreiben mit z.B. muster.exe Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519333</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519333</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Wed, 12 May 2004 20:39:56 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Wed, 12 May 2004 22:06:17 GMT]]></title><description><![CDATA[<p>sag einfach wo du steckengeblieben bist und ich erklärs dir</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519370</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519370</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 12 May 2004 22:06:17 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Wed, 12 May 2004 22:24:37 GMT]]></title><description><![CDATA[<p>Also zum testen hab ich ne Beispielanwendung programmiert und hab mit ShellExecute Notepad gestartet. Nun lass ich mit der Funktion FindWindow den Handle ausgeben(die Parameter hab ich aus Spy++) doch nun kann ich die Anwendung weder mit SendMessage(...) noch mit TerminateProcess schließen. Und meine SendMessage Funktion akzeptiert keine 4 Parameter. Es gehen nur (WM_CLOSE,NULL,NULL) mehr akzeptiert der nich.</p>
<p>ShellExecute(NULL, &quot;open&quot;,&quot;C:\\WINNT\\notepad.exe&quot;, NULL, NULL, SW_SHOWNORMAL);<br />
HANDLE a = FindWindow(&quot;Notepad&quot;,&quot;Unbennant - Editor&quot;);<br />
TerminateProcess(a,0);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519375</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Wed, 12 May 2004 22:24:37 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Thu, 13 May 2004 05:34:18 GMT]]></title><description><![CDATA[<p>ähhh, die MSDN lautet:</p>
<p>CWnd::FindWindow<br />
This method retrieves the top-level CWnd whose window class is specified by lpszClassName and whose window name, or title, is specified by lpszWindowName. This method does not search child windows.</p>
<p>static CWnd* PASCAL FindWindow(<br />
LPCTSTR lpszClassName,<br />
LPCTSTR lpszWindowName );<br />
Parameters<br />
lpszClassName<br />
Points to a null-terminated string that specifies the window class name, a WNDCLASS structure. If the lpClassName parameter is NULL, then all class names result as a successful match.<br />
lpszWindowName<br />
Points to a null-terminated string that specifies the window name, the window title. If the lpWindowName parameter is NULL, then all window names result as a successful match.</p>
<p>warum gibtst du als Parameter &quot;notepad&quot; und &quot;unbennant - editor&quot; an ?????</p>
<p>Ich würde FindWindow(NULL,&quot;notepad&quot;) angeben...... (denke ich..)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519394</guid><dc:creator><![CDATA[lulumann]]></dc:creator><pubDate>Thu, 13 May 2004 05:34:18 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Thu, 13 May 2004 08:54:29 GMT]]></title><description><![CDATA[<p>probier mal</p>
<pre><code class="language-cpp">ShellExecute(NULL, &quot;open&quot;,&quot;notepad&quot;, NULL, NULL, SW_SHOWNORMAL); 
CWnd* found = FindWindow(0,&quot;Unbennant - Editor&quot;);
if(found)
  ::SendMessage(found-&gt;m_hWnd,WM_Close,0,0);
</code></pre>
<p>zur erklärung</p>
<pre><code class="language-cpp">void CWnd::Funktion()
{
  SendMessage(WM_Close,0,0); //das ist die memberfunktion des cwnds
  ::SendMessage(hWnd,WM_Close,0,0); //das is die globale sendmessage funktion
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/519484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519484</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Thu, 13 May 2004 08:54:29 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Thu, 13 May 2004 12:51:40 GMT]]></title><description><![CDATA[<p>Danke für eure Hilfe aber es scheint immer noch nich zu klappen dass Fenster bleibt da.</p>
<p>p.s. WM_close funktioniert bei mir nicht (nichdeklarierter Bezeichner); damit ist doch WM_CLOSE gemeint oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519661</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519661</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Thu, 13 May 2004 12:51:40 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Thu, 13 May 2004 14:03:38 GMT]]></title><description><![CDATA[<p>ConquwererD schrieb:</p>
<blockquote>
<p>damit ist doch WM_CLOSE gemeint oder?</p>
</blockquote>
<p>ja</p>
<p>findet er das fenster? hat found einen wert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519720</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Thu, 13 May 2004 14:03:38 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Thu, 13 May 2004 14:37:19 GMT]]></title><description><![CDATA[<p>Ich glaube nicht! Wie kann ich das nachgucken? <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="😉"
    /> Hab mal nen else mit ner MessageBox eingefügt und er hat mir immer die MessageBox angezeigt müsste doch eigentlich heißen, dass es nicht gefunden wurde?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/519746</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/519746</guid><dc:creator><![CDATA[ConquwererD]]></dc:creator><pubDate>Thu, 13 May 2004 14:37:19 GMT</pubDate></item><item><title><![CDATA[Reply to Externes Fenster beenden! on Thu, 13 May 2004 22:07:14 GMT]]></title><description><![CDATA[<p>ja das würde es heissen<br />
besser nachschaun kannst du mit breakpoints/haltepunkten<br />
kannst ja mal in der msdn zu dem thema schmökern</p>
<p>schau dir mal enumwindows an... da hast du mehr einflussmöglichkeiten weil er dir in der callbackfunktion das handle jedes fensters gibt</p>
<p>schreib wenn du fragen oder probleme hast</p>
]]></description><link>https://www.c-plusplus.net/forum/post/520023</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/520023</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Thu, 13 May 2004 22:07:14 GMT</pubDate></item></channel></rss>