<?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[Datei-Explorer zum Öffnen von Dateien nutzen?]]></title><description><![CDATA[<p>Moin,</p>
<p>die Überschrift sagt eigentlich schon alles.</p>
<p>Ich möchte dieses kleine Fenster, das immer kommt, wenn man eine Datei öffnen möchte, aufrufen/programmieren etc.</p>
<p>Ich hoffe auf Hilfe,</p>
<p>Euer ItsNotYou</p>
<p>P.S.: Ich verstehe C, nicht C++. Deshalb hoffe ich bei Beispielen auf C.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/90529/datei-explorer-zum-öffnen-von-dateien-nutzen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 03:11:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/90529.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Oct 2004 11:34:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Sat, 30 Oct 2004 11:34:49 GMT]]></title><description><![CDATA[<p>Moin,</p>
<p>die Überschrift sagt eigentlich schon alles.</p>
<p>Ich möchte dieses kleine Fenster, das immer kommt, wenn man eine Datei öffnen möchte, aufrufen/programmieren etc.</p>
<p>Ich hoffe auf Hilfe,</p>
<p>Euer ItsNotYou</p>
<p>P.S.: Ich verstehe C, nicht C++. Deshalb hoffe ich bei Beispielen auf C.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/640919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/640919</guid><dc:creator><![CDATA[ItsNotYou]]></dc:creator><pubDate>Sat, 30 Oct 2004 11:34:49 GMT</pubDate></item><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Sat, 30 Oct 2004 11:48:15 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxfunctions/getopenfilename.asp" rel="nofollow">MSDN: GetOpenFileName</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/640933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/640933</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sat, 30 Oct 2004 11:48:15 GMT</pubDate></item><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Mon, 01 Nov 2004 18:57:18 GMT]]></title><description><![CDATA[<p>Ich habe mir jetzt von MSDN mir das Beispiel vorgenommen und abgewandelt:</p>
<pre><code class="language-cpp">void OpenFile()
{
    OPENFILENAME ofn;
    char szFile[300];
    HWND hwnd;
    HANDLE hf;

    ZeroMemory(&amp;ofn, sizeof(ofn));

    ofn.lStructSize = sizeof(ofn);
    ofn.hwndOwner = hwnd;
    ofn.lpstrFile = szFile;
    ofn.lpstrFile[0] = '\0';
    ofn.nMaxFile = sizeof(szFile);
    ofn.lpstrFilter = &quot;Alle\0*.*\0Wave\0*.wav\0Mp3\0*.mp3\0Midi\0*.mid\0&quot;;
    ofn.nFilterIndex = 1;
//    ofn.lpstrFileTitle = NULL;
//    ofn.nMaxFileTitel = 0;
// Mein Compiler sieht diese beiden als &quot;Überflüssig&quot; an
    ofn.lpstrInitialDir = NULL;
    ofn.Flags = OFN_PATHMUSTEXIST | OFN_PATHMUSTEXIST;

    if(!GetOpenFileName(&amp;ofn))
    {
        return;
    }

    hf = CreateFile(ofn.lpstrFile, GENERIC_READ, 0, (LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE)NULL);

    int ende = 0;
    int count = 0;

    for(count = 0;;count++)
    {
        switch(szFile[count])
        {
            case '.':
                if((szFile[count+1] == 'w') &amp;&amp; (szFile[count+2] == 'a') &amp;&amp; (szFile[count+3] == 'v'))
                {
                    char befehl[320];
                    wsprintf(befehl, &quot;open \&quot;%s\&quot; alias WAVE&quot;, szFile);
                    mciSendString(befehl, 0, 0, 0);
                }
                else if((szFile[count+1] == 'm') &amp;&amp; (szFile[count+2] == 'p') &amp;&amp; (szFile[count+3] == '3'))
                {
                    char befehl[320];
                    wsprintf(befehl, &quot;open \&quot;%s\&quot; alias MP3&quot;, szFile);
                    mciSendString(befehl, 0, 0, 0);
                }
                else if((szFile[count+1] == 'm') &amp;&amp; (szFile[count+2] == 'i') &amp;&amp; (szFile[count+3] == 'd'))
                {
                    char befehl[320];
                    wsprintf(befehl, &quot;open \&quot;%s\&quot; alias MIDI&quot;, szFile);
                    mciSendString(befehl, 0, 0, 0);
                }
        }    
    }
    return;
}
</code></pre>
<p>Wenn ich jetzt diese Funktion aufrufe... kommt nichts.</p>
<p>Warum?</p>
<p>Euer ItsNotYou</p>
]]></description><link>https://www.c-plusplus.net/forum/post/642471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/642471</guid><dc:creator><![CDATA[ItsNotYou]]></dc:creator><pubDate>Mon, 01 Nov 2004 18:57:18 GMT</pubDate></item><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Mon, 01 Nov 2004 20:02:16 GMT]]></title><description><![CDATA[<p>Platform SDK schrieb:</p>
<blockquote>
<p>lpstrFilter<br />
Pointer to a buffer containing pairs of null-terminated filter strings. The last string in the buffer must be terminated by two NULL characters.</p>
</blockquote>
<p>Ansonsten frag doch einfach GetLastError() warum die GetOpenFileName() nicht will...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/642496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/642496</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Mon, 01 Nov 2004 20:02:16 GMT</pubDate></item><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Tue, 02 Nov 2004 07:01:29 GMT]]></title><description><![CDATA[<p>1.) Wenn du kein anderes Hauptfenster hast bei hwndOwner einfach NULL angeben.<br />
2.) Hört sich blöd an, aber rufst du OpenFile auch auf <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="🙄"
    /> <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/642637</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/642637</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Tue, 02 Nov 2004 07:01:29 GMT</pubDate></item><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Tue, 02 Nov 2004 18:37:41 GMT]]></title><description><![CDATA[<p>Ich rufe die Funktion &quot;OpenFile()&quot; auf, wenn ein Button gedrückt wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/643114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/643114</guid><dc:creator><![CDATA[ItsNotYou]]></dc:creator><pubDate>Tue, 02 Nov 2004 18:37:41 GMT</pubDate></item><item><title><![CDATA[Reply to Datei-Explorer zum Öffnen von Dateien nutzen? on Tue, 02 Nov 2004 18:53:25 GMT]]></title><description><![CDATA[<p>Was sagt der Debugger?</p>
<p>Bis zu welcher Zeile geht das Programm, bevor es die Funktion nichtstuhend verläßt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/643131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/643131</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Tue, 02 Nov 2004 18:53:25 GMT</pubDate></item></channel></rss>