<?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[endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog]]></title><description><![CDATA[<p>Tach</p>
<pre><code class="language-cpp">OPENFILENAME ofn;
   char szFileName[MAX_PATH];

   ZeroMemory(&amp;ofn, sizeof(ofn));
   szFileName[0] = 0;

   ofn.lStructSize = sizeof(ofn);
   ofn.hwndOwner   = hwnd;
   ofn.lpstrFilter = &quot;Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0&quot;;
   ofn.lpstrFile   = szFileName;
   ofn.nMaxFile    = MAX_PATH;
   ofn.lpstrDefExt = &quot;txt&quot;;
</code></pre>
<p>Wie kann ich hier, zusätzlcih zu *.txt noch andere (z.b. *.bmp, *.doc) o.ä. hinzufügen??</p>
<p>muss ich nur &quot;ofn.lpstrFilter&quot; ändern??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/84983/endungen-hinzufügen-beim-quot-öffnen-quot-dialog</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 03:36:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/84983.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Sep 2004 09:53:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sat, 04 Sep 2004 09:53:43 GMT]]></title><description><![CDATA[<p>Tach</p>
<pre><code class="language-cpp">OPENFILENAME ofn;
   char szFileName[MAX_PATH];

   ZeroMemory(&amp;ofn, sizeof(ofn));
   szFileName[0] = 0;

   ofn.lStructSize = sizeof(ofn);
   ofn.hwndOwner   = hwnd;
   ofn.lpstrFilter = &quot;Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0&quot;;
   ofn.lpstrFile   = szFileName;
   ofn.nMaxFile    = MAX_PATH;
   ofn.lpstrDefExt = &quot;txt&quot;;
</code></pre>
<p>Wie kann ich hier, zusätzlcih zu *.txt noch andere (z.b. *.bmp, *.doc) o.ä. hinzufügen??</p>
<p>muss ich nur &quot;ofn.lpstrFilter&quot; ändern??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/599325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599325</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 04 Sep 2004 09:53:43 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sat, 04 Sep 2004 11:24:02 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">ofn.lpstrFilter = &quot;Text Files (*.txt)\0*.txt\0Bild-Dateien (*.jpg;*.bmp;*.gif;*.png)\0*.jpg;*.bmp;*.gif;*.png\0Alle Dateien (*.*)\0*.*\0\0&quot;;
</code></pre>
<p>Ergibt:<br />
Text Files (<em>.txt)<br />
Bild-Dateien (</em>.jpg;<em>.bmp;</em>.gif;<em>.png)<br />
Alle Dateien (</em>.*)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/599361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599361</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Sat, 04 Sep 2004 11:24:02 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sat, 04 Sep 2004 17:35:04 GMT]]></title><description><![CDATA[<p>Das wars??<br />
wofür ist denn dann das zuständig: ofn.lpstrDefExt = &quot;txt&quot;<br />
??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/599582</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599582</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 04 Sep 2004 17:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sat, 04 Sep 2004 17:40:58 GMT]]></title><description><![CDATA[<p>Danke, funktioneirt<br />
aber die Fragen anch dem (ofn.lpstrDefExt = &quot;txt&quot;) besteht weiterhin <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/599590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599590</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sat, 04 Sep 2004 17:40:58 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sun, 05 Sep 2004 07:14:57 GMT]]></title><description><![CDATA[<p>Das ist die &quot;Standard&quot; Endung.</p>
<p>Wählt der User <em>.</em> als Filter aus und gibt dann keine Datei-Endung an, wird lpstrDefExt benutzt, sofern es gesetzt ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/599752</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599752</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Sun, 05 Sep 2004 07:14:57 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sun, 05 Sep 2004 07:18:54 GMT]]></title><description><![CDATA[<p>aha, wenn er aber dann als name test.xyz eingibt, wird dann daraus test.xyz.txt??<br />
oder wird das nur eingesetzt, wenn der User &quot;test&quot; eingibt??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/599753</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599753</guid><dc:creator><![CDATA[RedEagle]]></dc:creator><pubDate>Sun, 05 Sep 2004 07:18:54 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Sun, 05 Sep 2004 09:48:19 GMT]]></title><description><![CDATA[<p>MSDN schrieb:</p>
<blockquote>
<p><strong>lpstrDefExt</strong>:<br />
Pointer to a buffer that contains the default extension. GetOpenFileName and GetSaveFileName <strong>append this extension to the file name if the user fails to type an extension</strong>. This string can be any length, but only the first three characters are appended. The string should not contain a period (.). If this member is NULL and the user fails to type an extension, no extension is appended.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/599786</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599786</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Sun, 05 Sep 2004 09:48:19 GMT</pubDate></item><item><title><![CDATA[Reply to endungen hinzufügen beim &amp;quot;öffnen&amp;quot;- dialog on Thu, 30 Sep 2004 20:17:03 GMT]]></title><description><![CDATA[<p>Alles schmarrn <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>The api states:<br />
-----------------<br />
lpstrDefExt<br />
Pointer to a buffer that contains the default extension. GetOpenFileName and GetSaveFileName append this extension to the file name if the user fails to type an extension. This string can be any length, but only the first three characters are appended. The string should not contain a period (.). If this member is NULL and the user fails to type an extension, no extension is appended.<br />
-----------------</p>
<p>What actually happens:<br />
If lpstrDefExt is NULL, no extension is appended, but if it is non-null, then it uses the first extension in the filter. In the following example, wang is appended rather than bar.<br />
ofn.lpstrFilter = &quot;Text files (<em>.txt)\0</em>.wang;<em>.foo\0All Files\0</em>.*\0&quot;;<br />
ofn.lpstrDefExt = &quot;bar&quot;;</p>
<p>Stimmt wirklich!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/618399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/618399</guid><dc:creator><![CDATA[ewitt7u0]]></dc:creator><pubDate>Thu, 30 Sep 2004 20:17:03 GMT</pubDate></item></channel></rss>