<?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[Probleme mit ShellExecute]]></title><description><![CDATA[<p>Hallo,<br />
folgendes Problem beschäftigt mich.<br />
Mit folgender Anweisung versuche ich mspaint.exe aufzurufen.</p>
<pre><code class="language-cpp">void __fastcall TForm1::ToolButtonPaintClick(TObject *Sender)
{
  AnsiString Path=&quot;C:\\WINDOWS\\system32\\mspaint.exe&quot;;
  AnsiString Param=&quot;C:\\Dokumente und Einstellungen\\IMG_6409.JPG&quot;;
  ShellExecute(0, &quot;open&quot;, Path.c_str(),Param.c_str(), NULL, SW_SHOW);
}
</code></pre>
<p>Bekomme jedoch diese Fehlermeldung: C:\Dokumente.bmp wurde nicht gefunden.</p>
<p>Erstelle ich ein Verzeichnis ohne Space im Verzeichnisnamen funktioniert der Aufruf einwandfrei. Wer sagt mir bitte, wie ich dieses Problem beheben kann. Freue mich auf Eure Hilfe und sage schon jetzt Danke für Hinweise.<br />
Gruß Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/161746/probleme-mit-shellexecute</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 17:18:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/161746.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Oct 2006 17:41:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit ShellExecute on Tue, 10 Oct 2006 17:41:30 GMT]]></title><description><![CDATA[<p>Hallo,<br />
folgendes Problem beschäftigt mich.<br />
Mit folgender Anweisung versuche ich mspaint.exe aufzurufen.</p>
<pre><code class="language-cpp">void __fastcall TForm1::ToolButtonPaintClick(TObject *Sender)
{
  AnsiString Path=&quot;C:\\WINDOWS\\system32\\mspaint.exe&quot;;
  AnsiString Param=&quot;C:\\Dokumente und Einstellungen\\IMG_6409.JPG&quot;;
  ShellExecute(0, &quot;open&quot;, Path.c_str(),Param.c_str(), NULL, SW_SHOW);
}
</code></pre>
<p>Bekomme jedoch diese Fehlermeldung: C:\Dokumente.bmp wurde nicht gefunden.</p>
<p>Erstelle ich ein Verzeichnis ohne Space im Verzeichnisnamen funktioniert der Aufruf einwandfrei. Wer sagt mir bitte, wie ich dieses Problem beheben kann. Freue mich auf Eure Hilfe und sage schon jetzt Danke für Hinweise.<br />
Gruß Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1152376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152376</guid><dc:creator><![CDATA[Egbert]]></dc:creator><pubDate>Tue, 10 Oct 2006 17:41:30 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Tue, 10 Oct 2006 18:13:09 GMT]]></title><description><![CDATA[<p>den Paramterstring in Anführungszeichen setzen:</p>
<pre><code class="language-cpp">String Param=&quot;\&quot;C:\\Dokumente und Einstellungen\\IMG_6409.JPG\&quot;&quot;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1152394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152394</guid><dc:creator><![CDATA[Christian411]]></dc:creator><pubDate>Tue, 10 Oct 2006 18:13:09 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Tue, 10 Oct 2006 18:32:18 GMT]]></title><description><![CDATA[<p>hallo egbert,</p>
<p>um unter windows systemen lange dateinamen verwenden zu können, insbesondere wenn leerzeichen im datei/ordner-namen sind, musst du diese mit &quot;&quot; umschliessen.</p>
<p>hintergrund dazu, man könnte das leerzeichen ja auch als abschluß ansehen, welches ja auch bei dir geschehen ist.</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1152402</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152402</guid><dc:creator><![CDATA[anonym001]]></dc:creator><pubDate>Tue, 10 Oct 2006 18:32:18 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Tue, 10 Oct 2006 18:53:36 GMT]]></title><description><![CDATA[<p>Hallo Christian, Hallo anonym001,<br />
zunächst vielen Dank für die Eure schnelle Antwort. Danke Christian, es klappt. Dieses Beispiel kommt allerdings bei mir etwas anders zur Anwendung. ich lese den Parameterpath aus einem img-&gt;Hint, wie hier im Code gezeigt.</p>
<pre><code class="language-cpp">void __fastcall TForm1::AktuellesBildmitPaintffnen1Click(TObject *Sender)
{
  char sWinDir[255];
  GetWindowsDirectory(sWinDir, sizeof(sWinDir));

  AnsiString Path=String(sWinDir)+&quot;\\system32\\mspaint.exe&quot;;
  if (FileExists(Path))
  {
    if (Komponent!=NULL)
    {
      String ClName=String(Komponent-&gt;ClassName());
      if (ClName==&quot;TImage&quot;)
      {
        TImage *img=dynamic_cast&lt;TImage*&gt;(Komponent);

//        AnsiString Param=img-&gt;Hint; // wie ich den Path bisher einlese 

        String Param = &quot;&quot;+img-&gt;Hint+&quot;&quot;; // hier der Versuch mit &quot;&quot;
//     String Param = &quot;\&quot;+img-&gt;Hint+&quot;&quot;; // hier der Versuch2 mit &quot;&quot; geht nicht!
        ShellExecute(0, &quot;open&quot;, Path.c_str(),Param.c_str(), NULL, SW_SHOW);
      } else
      ShowMessage(&quot;Sie müssen das zu bearbeitende Bild zuvor anklicken!&quot;);
    } else ShowMessage(&quot;Zur Zeit ist kein Bild aktiv!&quot;);
  } else ShowMessage(&quot;Kann   &quot;+Path+&quot;\nnicht finden!&quot;
                     &quot;\n\nStellen Sie sicher, daß sich mspaint.exe &quot;
                     &quot;in diesem Verzeichnis befindet.&quot;);
}
</code></pre>
<p>Es kommt hier ebenfalls wieder die gleiche Fehlermeldung, wie zu Anfang beschrieben. Wie kann ich img-&gt;Hint in &quot;&quot; einbinden?<br />
Danke und prima, daß Ihr mir helft!!!<br />
Gruß Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1152415</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152415</guid><dc:creator><![CDATA[Egbert]]></dc:creator><pubDate>Tue, 10 Oct 2006 18:53:36 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Tue, 10 Oct 2006 19:16:27 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">String Param = &quot;\&quot;&quot; + img-&gt;Hint + &quot;\&quot;&quot;;
</code></pre>
<p>Schon am SyntaxHighlighting erkennt man, ob richtig gequotet wurde.<br />
Praktikabler dürfte aber die Funktion <em>QuotedStr()</em> sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1152424</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152424</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Tue, 10 Oct 2006 19:16:27 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Tue, 10 Oct 2006 19:30:50 GMT]]></title><description><![CDATA[<p>Hallo Moderator Jansen,<br />
Danke, es klapt 100% ...<br />
Verzeich mir bitte, bin halt kein Profi... Freue mich und bin dankbar für jede Hilfe hier im Super-Forum.<br />
Grüße Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1152436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152436</guid><dc:creator><![CDATA[Egbert]]></dc:creator><pubDate>Tue, 10 Oct 2006 19:30:50 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Wed, 11 Oct 2006 16:36:31 GMT]]></title><description><![CDATA[<p>Hallo Jansen,<br />
habe nun mal die Funktion QuotedStr() eingebunden.</p>
<pre><code class="language-cpp">String Param = QuotedStr(img-&gt;Hint);
</code></pre>
<p>Funtioniert leider nicht. Folgende Fehlermeldung wird ausgegeben:</p>
<p>C:\Dokument und Einstellungen\'C:\Dokumente.bmp enthält eine ungültige Pfadangabe</p>
<p>Was mache ich hier falsch?<br />
Gruß Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153020</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153020</guid><dc:creator><![CDATA[Egbert]]></dc:creator><pubDate>Wed, 11 Oct 2006 16:36:31 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Wed, 11 Oct 2006 18:01:08 GMT]]></title><description><![CDATA[<p>Sorry, mein Fehler, QuotedStr erzeugt nur einfache Anführungszeichen.<br />
Hättest du mit einem Blick in die Hilfe zwar auch selbst feststellen können ... <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/1153072</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153072</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Wed, 11 Oct 2006 18:01:08 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Wed, 11 Oct 2006 18:22:53 GMT]]></title><description><![CDATA[<p>Habe das schon in der Hilfe gelesen. Dachte aber, vielleicht lässt sich das halbe Anführungszeichen irgendwie ergänzen.<br />
Jedenfalls, noch mal recht herzlichen Dank und bis zu meinem nächsten Problem, bzw., wenn ich mal wieder nicht weiter weiß.<br />
Gruß Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153091</guid><dc:creator><![CDATA[Egbert]]></dc:creator><pubDate>Wed, 11 Oct 2006 18:22:53 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Thu, 12 Oct 2006 09:11:00 GMT]]></title><description><![CDATA[<p>Es gibt aber auch die Funktion AnsiQuotedStr(). Hier läßt sich das gewünschte Anführungszeichen bestimmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153283</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153283</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 12 Oct 2006 09:11:00 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit ShellExecute on Thu, 12 Oct 2006 10:39:04 GMT]]></title><description><![CDATA[<p>Hallo Joe_M.<br />
Mit der Funktion AnsiQuotedStr() klappt es. Danke für den Hinweis!<br />
Gruß Egbert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153386</guid><dc:creator><![CDATA[Egbert]]></dc:creator><pubDate>Thu, 12 Oct 2006 10:39:04 GMT</pubDate></item></channel></rss>