<?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[Anwendung aus anwendung starten]]></title><description><![CDATA[<p>hallo,</p>
<p>meien anderen probleme haben sich soweit erledigt...<br />
Jetzt möchte ich eine sdi anwendung, aus einer dialogbasierten raus starten.<br />
-&gt; Button (klick) -&gt;open der sdi anwendung</p>
<p>1. geht das ??<br />
2. wie??</p>
<p>Bin dankbar für jede hilfe....</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/51961/anwendung-aus-anwendung-starten</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 18:57:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/51961.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Oct 2003 11:05:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 11:05:03 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>meien anderen probleme haben sich soweit erledigt...<br />
Jetzt möchte ich eine sdi anwendung, aus einer dialogbasierten raus starten.<br />
-&gt; Button (klick) -&gt;open der sdi anwendung</p>
<p>1. geht das ??<br />
2. wie??</p>
<p>Bin dankbar für jede hilfe....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372649</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372649</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 11:05:03 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 11:17:21 GMT]]></title><description><![CDATA[<p>Hy,</p>
<p>Wenn ich dich richtig verstanden habe möchtest du mit einem klick auf einem Button eine zweite ExE starten.<br />
Das kannst du mit</p>
<pre><code class="language-cpp">ShellExecute(HWND,&quot;open&quot;,&quot;file.exe&quot;,&quot;Eventuell Parameter&quot;,&quot;WorkDir&quot;,SW_SHOW);
</code></pre>
<p>machen.</p>
<p>Wenn du die zweite ExE in deine erste ExE packen möchtest müsstest du den Code in den speicher laden und diesen dann ausführen.<br />
Dabei kann ich dir leider nicht Helfen, denn dazu reicht mein wissen dann doch nicht.</p>
<p>Mit ShellExecute kannst du noch mehr machen.<br />
Schau mal in die MSDN.</p>
<p>Ich hoffe das hat dir geholfen.</p>
<p>MFG</p>
<p>ReneS</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372663</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372663</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 11:17:21 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 11:30:52 GMT]]></title><description><![CDATA[<p>kann man das os machen:</p>
<pre><code class="language-cpp">ShellExecute(ERROR_BAD_FORMAT ,&quot;open&quot;,&quot;k:\\\\...\\toll.exe&quot;,NULL, NULL, SW_SHOWNORMAL);
</code></pre>
<p><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="😕"
    /> <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>In den speicher laden?? wie meinst du das so wie man ein bitmap in den speicher setzt??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372683</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372683</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 11:30:52 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 11:34:54 GMT]]></title><description><![CDATA[<p>Mit ShellExecute startes du Programme.<br />
Ein Beispiel:</p>
<pre><code class="language-cpp">ShellExecute(NULL,&quot;open&quot;,&quot;C:\\WINNT\\notepad.exe&quot;,&quot;&quot;,&quot;&quot;,SW_SHOW);
</code></pre>
<p>Mal ne Frage:<br />
Hast du die zweite exe im Verzeichniss(Fertige EXE) oder in deinem Projekt?<br />
Mit in deinem Projekt meine ich das du Dialog und SDI in einem und demselben Projekt bearbeitest.<br />
Wobei ich nicht einmal sicher bin ob das überhaupt geht.</p>
<p>MFG</p>
<p>RS</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372691</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372691</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 11:34:54 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 11:40:47 GMT]]></title><description><![CDATA[<p>Also das sind zwei verschieden verzeichnisse.<br />
Ich möchte per button druck, dass die zweite anwendung (SDI) geöffnet wird und ausführbar ist.<br />
Oder kann ich vielleicht eine SDI direkt erstellen in einer Dialogbasiertenanwendung??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372700</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 11:40:47 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 11:59:08 GMT]]></title><description><![CDATA[<p>Ich denke mir das es einfacher ist eine zweite exe zu erstellen und diese dann mit ShellExecute zu starten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372725</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372725</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 11:59:08 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:01:39 GMT]]></title><description><![CDATA[<p>hab ich ja<br />
habe zwei unterschiedliche progs, die in unterschiedlichen ordner sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372731</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:01:39 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:04:40 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>jetzt hab ich es so gemacht :</p>
<pre><code class="language-cpp">CString stropen;

	stropen = openfenster;
	openfenster.MakeUpper();

	WinExec(&quot;k:\\\\...\\toll.exe&quot;,SW_SHOW);
</code></pre>
<p>es geht, jetzt muss nur noch das fenster in den vordergrund<br />
weiss du vielleicht wie das geht????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372737</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372737</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:04:40 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:19:11 GMT]]></title><description><![CDATA[<p>Du musst mit FindWindow das Handle der Anwendug holen und dann<br />
den Focus drauf setzten.</p>
<p>MFG</p>
<p>RS</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372755</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:19:11 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:25:38 GMT]]></title><description><![CDATA[<p>kannst du mir das mal genauer erklären???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372763</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372763</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:25:38 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:32:37 GMT]]></title><description><![CDATA[<p>Servus,</p>
<pre><code class="language-cpp">HWND hHandle = ::FindWindow(NULL, &quot;FensterName&quot;);
CWnd* pCwnd = FromHandle(hHandle);

pCwnd-&gt;SetForegroundWindow();
</code></pre>
<p>müsste so gehen habs aber nicht getestet <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>*winke*<br />
Hellsgore</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372771</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372771</guid><dc:creator><![CDATA[Hellsgore]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:32:37 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:36:17 GMT]]></title><description><![CDATA[<p>Geht <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="😃"
    /> <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="😃"
    /> <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>
]]></description><link>https://www.c-plusplus.net/forum/post/372778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372778</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:36:17 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:40:15 GMT]]></title><description><![CDATA[<p>das kann ich aber auf meine erste lösung nicht anwenden oder???<br />
Das geht aber irgendwie nicht....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372783</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372783</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:40:15 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 12:44:11 GMT]]></title><description><![CDATA[<p>Ganz einfach:</p>
<pre><code class="language-cpp">WinExec(&quot;k:\\\\...\\toll.exe&quot;,SW_SHOW);
HWND hHandle = ::FindWindow(NULL, &quot;FensterName&quot;); //Der Fenstername steht oben in der Titelleiste
CWnd* pCwnd = FromHandle(hHandle); 

pCwnd-&gt;SetForegroundWindow();
</code></pre>
<p>MFG<br />
RS</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372792</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 12:44:11 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 13:04:25 GMT]]></title><description><![CDATA[<p>ja danke jetzt geht zwar das fenster auf, aber bevor es auf geht zeigt es mir noch ne fehlermeldung und dann schliesst sich die hauptanwendung....</p>
<p>ich hab das jetzt so gemacht:</p>
<pre><code class="language-cpp">CString stropen;

	stropen = openfenster;
	openfenster.MakeUpper();
	WinExec(&quot;k:\\\\...\\toll.exe&quot;,SW_SHOW); 
	HWND hHandle = ::FindWindow(NULL, &quot;Toll&quot;); //Der Fenstername steht    oben in der Titelleiste 

	CWnd* pCwnd = FromHandle(hHandle);  

	pCwnd-&gt;SetForegroundWindow();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/372817</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372817</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 13:04:25 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 13:07:27 GMT]]></title><description><![CDATA[<p>Hauptsache es funktioniert <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="😃"
    /> <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="😉"
    /> <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>
]]></description><link>https://www.c-plusplus.net/forum/post/372822</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372822</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 13:07:27 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 13:10:06 GMT]]></title><description><![CDATA[<p><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="😃"
    /> <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="😃"
    /> <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="😃"
    /> <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="😃"
    /><br />
sehr witzig<br />
<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="😃"
    /> <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="😃"
    /> <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="😃"
    /> <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>es wäre schon nicht schlecht wenn man danach noch das hauptprogr. danach noch benutzen könnte</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372827</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Wed, 15 Oct 2003 13:10:06 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Wed, 15 Oct 2003 13:16:21 GMT]]></title><description><![CDATA[<p>Was für eine Meldung bekommst du denn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/372831</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/372831</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Wed, 15 Oct 2003 13:16:21 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 05:41:38 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe jetzt mit Projekt-&gt;dem Projekt hinzufügen einfach die dateien der sdi-anwendung hinzugefügt.<br />
Er hatte mir zuerst einen fehler angezeigt das stdafx und noch ein afx, das gleiche erstellen würde... da habe ich die kurzerhand gelöscht und jetzt zeigt er folgendes :</p>
<p>fatal error C1083: vorkompilierte Header-Datei-Datei kann nicht geoeffnet werden: 'Debug/Start.pch': No such file or directory</p>
<p>Die ist aber noch da, also die start.pch, nur im release ordner....<br />
Ich glaube das ich etwas vorschnell gehandelt habe mit dem löschen...</p>
<p>kann mir einer einen tip geben??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373341</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Thu, 16 Oct 2003 05:41:38 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 06:55:29 GMT]]></title><description><![CDATA[<p>Morgäään,</p>
<p>Versuche doch erst mal die Projektmappe komplett neu zu erstellen.<br />
Das hat bei mir manchmal wunder bewirkt.</p>
<p>MFG</p>
<p>RS</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373371</guid><dc:creator><![CDATA[ReneS]]></dc:creator><pubDate>Thu, 16 Oct 2003 06:55:29 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 07:07:36 GMT]]></title><description><![CDATA[<p>moin,</p>
<p>hat sich erledigt so wie heute morgen beschrieben mach ich es nicht, ich mach es so wie gestern.<br />
mitlerweile zeigt er jeine fehlermeldung mehr an, aber deswegen bleibt das hprog nicht da.<br />
naja da wird sich noch ne lösung finden lassen.... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/373379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373379</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Thu, 16 Oct 2003 07:07:36 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 07:47:57 GMT]]></title><description><![CDATA[<p>Es sieht so aus als wenn er immer wenn er an diese stelle kommt alles schliesst:</p>
<pre><code class="language-cpp">pCwnd-&gt;SetForegroundWindow();
</code></pre>
<p>WEnn ich es weg lasse setzt er es wieder hinter die ganzen anderen fenster!!<br />
weiss jemand was anderes das ich für SetForegroundWindow(); einsetztem kann,<br />
ich habe schon einige probiert bei denen auch immer das gleiche passiert gleiche passiert........ aber das richtige habe ich noch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373395</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Thu, 16 Oct 2003 07:47:57 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 08:00:47 GMT]]></title><description><![CDATA[<p>Das Fenster wird definitiv mit SetForgroundWindow in den Vordergrund geholt.</p>
<p>Dein Problem liegt warscheinlich daran, dass er das Fenster nicht gefunden hat.</p>
<p>Teste mal, ob der Zeiger auf das Fenster (CWnd) NULL ist.<br />
Das kann nämlich der Fall sein, wenn er das Fenster mit FindWindow nicht gefunden hat. Solltest Du eh auf jeden Fall absichern, da sonst immer die Gefahr besteht, dass Dir Dein Prog an der Stelle abschmiert.</p>
<p>Manche Anwendungen benötigen auch eine gewisse Zeit zum Laden und dann findet er das Fenster noch nicht, wenn FindWindow unmittelbar nach WinExec oder ShellExecute aufgerufen wird. Vielleicht hilft ein Sleep zwischen WinExec und FindWindow.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373404</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Thu, 16 Oct 2003 08:00:47 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 08:17:14 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>das testen kann ich doch so oder:</p>
<pre><code class="language-cpp">if( pCwnd ==NULL)
			MessageBox(&quot;Nix&quot;);
		else
			MessageBox(&quot;es geht&quot;);
</code></pre>
<p>in dem fall gibt er nämlich &quot;Nix&quot; zurück......</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373418</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Thu, 16 Oct 2003 08:17:14 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 08:29:33 GMT]]></title><description><![CDATA[<p>Richtig. Also ist der Zeiger NULL, damit crashts beim Aufruf von SetForegroundWindow</p>
<p>Willst Du SetForegroundWindow ausführen, sichere es ab:</p>
<pre><code class="language-cpp">if (pCwnd)
  pCwnd-&gt;SetForegroundWindow();
</code></pre>
<p>Er hat also das Fenster nicht gefunden.<br />
1. Entweder stimmt der Fenstertitel nicht, den Du bei FindWindow mitgegeben hast oder<br />
2. das Fenster ist noch nicht da, weil das Prog noch nicht komplett geöffnet wurde.</p>
<p>Falls 1. nicht zutrifft, versuchs mal mit Sleep dazwischen:</p>
<pre><code class="language-cpp">WinExec(&quot;k:\\\\...\\toll.exe&quot;,SW_SHOW);  
Sleep(5000);
HWND hHandle = ::FindWindow(NULL, &quot;Toll&quot;); //Der Fenstername steht oben in der Titelleiste
</code></pre>
<p>5000 (5 sec) ist ziemlich lang, aber kannst Dich ja mit kleineren Werten runtertesten.<br />
(Bedenke aber, das manche Anwendung beim wirklich ersten Start, etwas länger brauch, als wenn sie das zweite mal aufgerufen wurde)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373427</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373427</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Thu, 16 Oct 2003 08:29:33 GMT</pubDate></item><item><title><![CDATA[Reply to Anwendung aus anwendung starten on Thu, 16 Oct 2003 08:39:46 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>jetzt sieht das so aus:</p>
<pre><code class="language-cpp">WinExec(&quot;k:\\\\...\\toll.exe&quot;,SW_SHOW); 
	Sleep(2500);
	HWND hHandle = ::FindWindow(NULL, &quot;toll&quot;); //Der Fenstername steht oben in der Titelleiste 

	CWnd* pCwnd = FromHandle(hHandle);  

			if (pCwnd) 
			{
			pCwnd-&gt;SetForegroundWindow();
			}
			else
			{
			MessageBox(&quot;nix&quot;);
			}
</code></pre>
<p>jetzt zeigt das zu öffnede fenster unter den anderen fenster an und ohne das ich die fenster schliess komme ich nicht es ran und trotzdem zeigt er die messagebox, auch noch an....... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/373433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373433</guid><dc:creator><![CDATA[HELPLESS]]></dc:creator><pubDate>Thu, 16 Oct 2003 08:39:46 GMT</pubDate></item></channel></rss>