E
Alles schmarrn
The api states:
-----------------
lpstrDefExt
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.
-----------------
What actually happens:
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.
ofn.lpstrFilter = "Text files (.txt)\0.wang;.foo\0All Files\0.*\0";
ofn.lpstrDefExt = "bar";
Stimmt wirklich!