<?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[FileDialog]]></title><description><![CDATA[<p>Hi @ all !<br />
Also ich will mir in der API einen Dialog basteln, wie in der MFC einen CFileDialog. Meine Frage dazu ist gibt es vielleicht schon irgendwas vorgefertigtes wo man sich was abgucken kann ????</p>
<p>MfG Reasar</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/104905/filedialog</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 13:20:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/104905.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Mar 2005 11:06:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FileDialog on Thu, 24 Mar 2005 11:06:07 GMT]]></title><description><![CDATA[<p>Hi @ all !<br />
Also ich will mir in der API einen Dialog basteln, wie in der MFC einen CFileDialog. Meine Frage dazu ist gibt es vielleicht schon irgendwas vorgefertigtes wo man sich was abgucken kann ????</p>
<p>MfG Reasar</p>
]]></description><link>https://www.c-plusplus.net/forum/post/751609</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/751609</guid><dc:creator><![CDATA[Reasar]]></dc:creator><pubDate>Thu, 24 Mar 2005 11:06:07 GMT</pubDate></item><item><title><![CDATA[Reply to FileDialog on Thu, 24 Mar 2005 11:18:30 GMT]]></title><description><![CDATA[<p>Da brauchst du nichts zu basteln. Nimm GetOpenFileName.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/751623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/751623</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 24 Mar 2005 11:18:30 GMT</pubDate></item><item><title><![CDATA[Reply to FileDialog on Thu, 24 Mar 2005 11:25:14 GMT]]></title><description><![CDATA[<p>Jo das hilft mir weiter. Danke für die Hilfe <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/751631</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/751631</guid><dc:creator><![CDATA[Reasar]]></dc:creator><pubDate>Thu, 24 Mar 2005 11:25:14 GMT</pubDate></item><item><title><![CDATA[Reply to FileDialog on Thu, 24 Mar 2005 12:56:45 GMT]]></title><description><![CDATA[<p>Wie komm ich denn jetzt da an den komplettspeicherpfad ?</p>
<pre><code>fn.lpstrFile         = def;
</code></pre>
<p>Steht der hinter her dadrin oder wie darf man das verstehen ???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/751745</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/751745</guid><dc:creator><![CDATA[Reasar]]></dc:creator><pubDate>Thu, 24 Mar 2005 12:56:45 GMT</pubDate></item><item><title><![CDATA[Reply to FileDialog on Thu, 24 Mar 2005 13:00:54 GMT]]></title><description><![CDATA[<p>Steht doch in der MSDN Library:</p>
<p><strong>lpstrFile</strong><br />
[...]<br />
When the GetOpenFileName or GetSaveFileName function returns successfully, this buffer contains the drive designator, path, file name, and extension of the selected file.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/751749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/751749</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 24 Mar 2005 13:00:54 GMT</pubDate></item><item><title><![CDATA[Reply to FileDialog on Thu, 04 May 2006 14:00:20 GMT]]></title><description><![CDATA[<p>Hallo, (ist mein erster Post hier)</p>
<p>Ich habe das Problem mit den Dateiendungen auch. Wenn man den FileDialog mit GetSvaFilename öffnet, und z.B. etwas bestimmtes unter einem neuen Namen speichern will, dann gibt man bei Dateinamen den Namen ein, und sucht sich darunter den Dateityp aus.<br />
Hier mal das Zitat:</p>
<p>MFK schrieb:</p>
<blockquote>
<p>When the GetOpenFileName or GetSaveFileName function returns successfully, this buffer contains the drive designator, path, file name, <strong>and extension</strong> of the selected file.</p>
</blockquote>
<p>Wenn man jetzt aber auf Speichern drückt, dann ist in dem buffer(lpstrFile) nur der Pfad und der Name der Datei enthalten. Aber die Dateiendung fehlt?</p>
<p>Hier mal mein Code: (es ist für eine DLL)</p>
<pre><code class="language-cpp">int __declspec(dllexport) _cdecl GetSaveFileNameWrapper( const void *in,int in_size,void *out,int out_sz )
{

	UINT *ptr1 = (UINT*)(in);                        // flags
	LPCTSTR ptr2 = (char*)in + 4;                    // initial dir
	LPCTSTR ptr3 = ptr2 + strlen(ptr2) + 1;          // titlebar text
	LPCTSTR ptr4 = ptr3 + strlen(ptr3) + 1;          // filter (double null terminated)

	OPENFILENAME ofn;                                // common dialog box structure

	// Fill the structure
	ZeroMemory(out, out_sz);
	ZeroMemory(&amp;ofn, sizeof(OPENFILENAME));
	ofn.lStructSize = sizeof(OPENFILENAME);
	ofn.hwndOwner = NULL;
	ofn.lpstrFile = out;
	ofn.nMaxFile = out_sz;
	ofn.lpstrFilter = ptr4;
	ofn.nFilterIndex = 1;
	ofn.lpstrFileTitle = NULL;
	ofn.nMaxFileTitle = 0;
	ofn.lpstrTitle = ptr3;
	ofn.lpstrInitialDir = ptr2;
	ofn.Flags = (int)*ptr1 | OFN_EXPLORER;

	// Display the Open dialog box and return whether or not it failed.
	return (int)GetSaveFileName(&amp;ofn);
}
</code></pre>
<p>Wie kann man machen, dass jetzt der komplette Pfad+Dateinamen+Dateiendung an <em>out</em> geschickt werden?</p>
<p>Ps.: Sagt mir nicht, dass ich in der MSDN schauen soll, denn ich bin eine Freund von der MSDN und schau sehr oft da rein, hab aber keine Lösung für mein Problem gefunden <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/1050911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050911</guid><dc:creator><![CDATA[Bullja]]></dc:creator><pubDate>Thu, 04 May 2006 14:00:20 GMT</pubDate></item><item><title><![CDATA[Reply to FileDialog on Fri, 05 May 2006 10:25:50 GMT]]></title><description><![CDATA[<p>Wenn der Benutzer nicht explizit eine Extension eingibt, wird auch keine übernommen - die Combobox für den Dateityp dient lediglich als Filter für die Verzeichnisanzeige. Wenn Dein Programm keine Dateiextension findet, muss es sie selbst anhängen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051405</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051405</guid><dc:creator><![CDATA[mgs_]]></dc:creator><pubDate>Fri, 05 May 2006 10:25:50 GMT</pubDate></item></channel></rss>