<?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[Programmstart-Funktion lässt sich nicht kompilieren]]></title><description><![CDATA[<p>Hi, ich gehe grad so ein E-Book durch, um mich ein bisschen in C++ einzuarbeiten. Allerdings will er den fett markierten Code nicht kompilieren:</p>
<pre><code>void CControlsDlg::OnBnClickedRunpgm()
{
	// TODO: Fügen Sie hier Ihren Kontrollbehandlungscode für die Benachrichtigung ein.

	// Aktuelle Werte vom Bildschirm holen
	UpdateData(TRUE);

	// Lokale Variable zur Aufnahme des Programmnamens deklarieren
	CString strPgmName;

	// Programmname in die lokale Variable kopieren
	strPgmName = m_strProgToRun;

	// Programmname in Großbuchstaben umwandeln
	strPgmName.MakeUpper();

	// Programm Paint gewählt?
	if (strPgmName == &quot;PAINT&quot;)
		// Ja, Paint starten
		WinExec(&quot;mspaint.exe &quot;, SW_SHOW);

	// Programm Notepad (Editor) gewählt?
	if (strPgmName == &quot;NOTEPAD&quot;)
		// Ja, Notepad starten
		WinExec(&quot;notepad.exe &quot;, SW_SHOW);

	// Programm Solitaire gewählt?
	if (strPgmName == &quot;SOLITAIRE&quot;)
		// Ja, Solitaire starten
		WinExec(&quot;sol.exe &quot;, SW_SHOW);

	[b]// Anderer Programmname ins Kombinationsfeld eingeben
	if ((strPgmName != &quot;PAINT&quot;) &amp;&amp; (strPgmName != &quot;NOTEPAD&quot;) &amp;&amp; (strPgmName != &quot;SOLITAIRE&quot;))
		// Ja, eingegebenes Programm ausführen
		WinExec(strPgmName , SW_SHOW);[/b]
}
</code></pre>
<p>Eingesetzte Software ist Visual Studio 2005.</p>
<p>Für schnelle Hilfe wäre ich sehr dankbar!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/140942/programmstart-funktion-lässt-sich-nicht-kompilieren</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 08:41:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/140942.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Mar 2006 12:15:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programmstart-Funktion lässt sich nicht kompilieren on Sat, 18 Mar 2006 12:34:57 GMT]]></title><description><![CDATA[<p>Hi, ich gehe grad so ein E-Book durch, um mich ein bisschen in C++ einzuarbeiten. Allerdings will er den fett markierten Code nicht kompilieren:</p>
<pre><code>void CControlsDlg::OnBnClickedRunpgm()
{
	// TODO: Fügen Sie hier Ihren Kontrollbehandlungscode für die Benachrichtigung ein.

	// Aktuelle Werte vom Bildschirm holen
	UpdateData(TRUE);

	// Lokale Variable zur Aufnahme des Programmnamens deklarieren
	CString strPgmName;

	// Programmname in die lokale Variable kopieren
	strPgmName = m_strProgToRun;

	// Programmname in Großbuchstaben umwandeln
	strPgmName.MakeUpper();

	// Programm Paint gewählt?
	if (strPgmName == &quot;PAINT&quot;)
		// Ja, Paint starten
		WinExec(&quot;mspaint.exe &quot;, SW_SHOW);

	// Programm Notepad (Editor) gewählt?
	if (strPgmName == &quot;NOTEPAD&quot;)
		// Ja, Notepad starten
		WinExec(&quot;notepad.exe &quot;, SW_SHOW);

	// Programm Solitaire gewählt?
	if (strPgmName == &quot;SOLITAIRE&quot;)
		// Ja, Solitaire starten
		WinExec(&quot;sol.exe &quot;, SW_SHOW);

	[b]// Anderer Programmname ins Kombinationsfeld eingeben
	if ((strPgmName != &quot;PAINT&quot;) &amp;&amp; (strPgmName != &quot;NOTEPAD&quot;) &amp;&amp; (strPgmName != &quot;SOLITAIRE&quot;))
		// Ja, eingegebenes Programm ausführen
		WinExec(strPgmName , SW_SHOW);[/b]
}
</code></pre>
<p>Eingesetzte Software ist Visual Studio 2005.</p>
<p>Für schnelle Hilfe wäre ich sehr dankbar!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1018929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1018929</guid><dc:creator><![CDATA[iNFiNiTY]]></dc:creator><pubDate>Sat, 18 Mar 2006 12:34:57 GMT</pubDate></item><item><title><![CDATA[Reply to Programmstart-Funktion lässt sich nicht kompilieren on Sat, 18 Mar 2006 12:45:23 GMT]]></title><description><![CDATA[<p>Sollen wir hellsehen was für einen Fehler der Compiler ausspuckt oder wie? Und ausserdem ist WinExec seit 100 Jahren veraltet. Benutz CreateProcess.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1018953</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1018953</guid><dc:creator><![CDATA[ggdggdf]]></dc:creator><pubDate>Sat, 18 Mar 2006 12:45:23 GMT</pubDate></item><item><title><![CDATA[Reply to Programmstart-Funktion lässt sich nicht kompilieren on Sat, 18 Mar 2006 13:00:07 GMT]]></title><description><![CDATA[<p>In VC2005 ist per default alles UNICODE. Somit verwende für String-Lietrale bitte das _T makro!<br />
Also z.B.</p>
<pre><code class="language-cpp">_T(&quot;PAINT&quot;)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1018968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1018968</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 18 Mar 2006 13:00:07 GMT</pubDate></item><item><title><![CDATA[Reply to Programmstart-Funktion lässt sich nicht kompilieren on Sat, 18 Mar 2006 13:04:14 GMT]]></title><description><![CDATA[<p>ggdggdf schrieb:</p>
<blockquote>
<p>Sollen wir hellsehen was für einen Fehler der Compiler ausspuckt oder wie? Und ausserdem ist WinExec seit 100 Jahren veraltet. Benutz CreateProcess.</p>
</blockquote>
<p>1&gt;z:\visual studio 2005\projects\controls\controls\controlsdlg.cpp(315) : error C2664: 'WinExec': Konvertierung des Parameters 1 von 'CString' in 'LPCSTR' nicht möglich<br />
1&gt; Kein benutzerdefinierter Konvertierungsoperator verfügbar, der diese Konvertierung durchführen kann, oder der Operator kann nicht aufgerufen werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1018974</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1018974</guid><dc:creator><![CDATA[iNFiNiTY]]></dc:creator><pubDate>Sat, 18 Mar 2006 13:04:14 GMT</pubDate></item><item><title><![CDATA[Reply to Programmstart-Funktion lässt sich nicht kompilieren on Sat, 18 Mar 2006 13:16:20 GMT]]></title><description><![CDATA[<p>Wie gesagt, Du verwendest UNICODE und WinExec kann kein Unicode... WinExec sollte auch nicht mehr verwendet werden (siehe Doku).<br />
Verwende entweder CreateProcess oder ShellExecute, da hast Du dann diese Probleme nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019003</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019003</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 18 Mar 2006 13:16:20 GMT</pubDate></item><item><title><![CDATA[Reply to Programmstart-Funktion lässt sich nicht kompilieren on Sun, 19 Mar 2006 11:42:30 GMT]]></title><description><![CDATA[<p>Kenn mich mit CString nicht aus, aber vielleicht sowas wie strPgmName.c_str(); ?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1019553</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1019553</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sun, 19 Mar 2006 11:42:30 GMT</pubDate></item></channel></rss>