<?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[GetOpenFileName]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
     static HINSTANCE hInstance;
	 static OPENFILENAME ofn;
	 static TCHAR szFile[100];
     switch (message)
     {
     case WM_CREATE:
		  hInstance = ((LPCREATESTRUCT) lParam)-&gt;hInstance;
          ofn.lStructSize       = sizeof (OPENFILENAME) ;
          ofn.hwndOwner         = hwnd ;
          ofn.hInstance         = NULL ;
	      ofn.lpstrFilter       = TEXT(&quot;All\0*.*\0\0Text\0*.TXT\0\0&quot;);
          ofn.lpstrCustomFilter = NULL ;
          ofn.nMaxCustFilter    = 0 ;
          ofn.nFilterIndex      = 0 ;
          ofn.lpstrFile         = NULL ;          // Bei Öffnen bzw. Schließen gesetzt
          ofn.nMaxFile          = MAX_PATH ;
          ofn.lpstrFileTitle    = NULL ;          // Bei Öffnen bzw. Schließen gesetzt
          ofn.nMaxFileTitle     = MAX_PATH ;
          ofn.lpstrInitialDir   = NULL ;
          ofn.lpstrTitle        = NULL ;
          ofn.Flags             = 0 ;             // Bei Öffnen bzw. Schließen gesetzt
          ofn.nFileOffset       = 0 ;
          ofn.nFileExtension    = 0 ;
          ofn.lpstrDefExt       = TEXT (&quot;txt&quot;) ;
          ofn.lCustData         = 0L ;
          ofn.lpfnHook          = NULL ;
          ofn.lpTemplateName    = NULL ;
          return 0 ;
	 case WM_COMMAND:
		  switch(LOWORD(wParam))
		  {
		  case ID_ANDERES_\1:
			   DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1),
				         hwnd, AboutProc);
		       break;
		  case ID_ANDERES_ASKABOUTSAVE:
			   ofn.hwndOwner         = hwnd ;
               ofn.lpstrFile         = szFile ;
               ofn.lpstrFileTitle    = TEXT (&quot;Dialoge1&quot;) ;
               ofn.Flags             = OFN_HIDEREADONLY | OFN_CREATEPROMPT ;
			   GetOpenFileName(&amp;ofn);
			   break;
		  }
		  return 0;
     case WM_DESTROY:
          PostQuitMessage (0) ;
          return 0 ;
     }
     return DefWindowProc (hwnd, message, wParam, lParam) ;
}
</code></pre>
<p>Hallo ich wollte mit GetOPenFileName arbeiten, aber nachdem ich die Datei ausgewählt habe und auf Öffnen klicke stürzt das Programm ab?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/220393/getopenfilename</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 14:00:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/220393.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Aug 2008 13:19:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetOpenFileName on Fri, 15 Aug 2008 13:19:59 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
     static HINSTANCE hInstance;
	 static OPENFILENAME ofn;
	 static TCHAR szFile[100];
     switch (message)
     {
     case WM_CREATE:
		  hInstance = ((LPCREATESTRUCT) lParam)-&gt;hInstance;
          ofn.lStructSize       = sizeof (OPENFILENAME) ;
          ofn.hwndOwner         = hwnd ;
          ofn.hInstance         = NULL ;
	      ofn.lpstrFilter       = TEXT(&quot;All\0*.*\0\0Text\0*.TXT\0\0&quot;);
          ofn.lpstrCustomFilter = NULL ;
          ofn.nMaxCustFilter    = 0 ;
          ofn.nFilterIndex      = 0 ;
          ofn.lpstrFile         = NULL ;          // Bei Öffnen bzw. Schließen gesetzt
          ofn.nMaxFile          = MAX_PATH ;
          ofn.lpstrFileTitle    = NULL ;          // Bei Öffnen bzw. Schließen gesetzt
          ofn.nMaxFileTitle     = MAX_PATH ;
          ofn.lpstrInitialDir   = NULL ;
          ofn.lpstrTitle        = NULL ;
          ofn.Flags             = 0 ;             // Bei Öffnen bzw. Schließen gesetzt
          ofn.nFileOffset       = 0 ;
          ofn.nFileExtension    = 0 ;
          ofn.lpstrDefExt       = TEXT (&quot;txt&quot;) ;
          ofn.lCustData         = 0L ;
          ofn.lpfnHook          = NULL ;
          ofn.lpTemplateName    = NULL ;
          return 0 ;
	 case WM_COMMAND:
		  switch(LOWORD(wParam))
		  {
		  case ID_ANDERES_\1:
			   DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1),
				         hwnd, AboutProc);
		       break;
		  case ID_ANDERES_ASKABOUTSAVE:
			   ofn.hwndOwner         = hwnd ;
               ofn.lpstrFile         = szFile ;
               ofn.lpstrFileTitle    = TEXT (&quot;Dialoge1&quot;) ;
               ofn.Flags             = OFN_HIDEREADONLY | OFN_CREATEPROMPT ;
			   GetOpenFileName(&amp;ofn);
			   break;
		  }
		  return 0;
     case WM_DESTROY:
          PostQuitMessage (0) ;
          return 0 ;
     }
     return DefWindowProc (hwnd, message, wParam, lParam) ;
}
</code></pre>
<p>Hallo ich wollte mit GetOPenFileName arbeiten, aber nachdem ich die Datei ausgewählt habe und auf Öffnen klicke stürzt das Programm ab?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1565471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1565471</guid><dc:creator><![CDATA[problem mit Dialog]]></dc:creator><pubDate>Fri, 15 Aug 2008 13:19:59 GMT</pubDate></item><item><title><![CDATA[Reply to GetOpenFileName on Fri, 15 Aug 2008 13:31:34 GMT]]></title><description><![CDATA[<p>szFile ist nur 100 Zeichen lang und nicht MAX_PATH. Ist der ausgewählte Dateiname länger als 100 Zeichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1565482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1565482</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Fri, 15 Aug 2008 13:31:34 GMT</pubDate></item><item><title><![CDATA[Reply to GetOpenFileName on Fri, 15 Aug 2008 13:45:22 GMT]]></title><description><![CDATA[<p>da ändert sich nix</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1565493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1565493</guid><dc:creator><![CDATA[problem mit Dialog]]></dc:creator><pubDate>Fri, 15 Aug 2008 13:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to GetOpenFileName on Fri, 15 Aug 2008 13:52:40 GMT]]></title><description><![CDATA[<blockquote>
<p>lpstrFileTitle<br />
Pointer to a buffer that receives the file name and extension (without path information) of the selected file. This member can be NULL.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1565497</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1565497</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Fri, 15 Aug 2008 13:52:40 GMT</pubDate></item><item><title><![CDATA[Reply to GetOpenFileName on Fri, 15 Aug 2008 13:54:10 GMT]]></title><description><![CDATA[<p>yahu vielen dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1565498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1565498</guid><dc:creator><![CDATA[problem mit Dialog]]></dc:creator><pubDate>Fri, 15 Aug 2008 13:54:10 GMT</pubDate></item></channel></rss>