The initdir parameter in GetFileOpenName uses some different algorithms in Windows 7/8.1/10 than in Windows 2000/XP/Vista.
-
If initdir has the same value that was selected in the first instance of the application's Open or Save As dialog box, then it uses the path the user selected most recently as the initial directory.
-
If filename contains a path, that path is the initial directory.
-
If initdir is not NULL, it specifies the initial directory.
-
If initdir is NULL and the current directory contains any files of the specified filter types, the initial directory is the current directory.
-
Otherwise, the initial directory is the personal files directory of the current user.
-
If no other conditions are met, the initial directory is the Desktop folder.
-
If filename contains a path, that path is the initial directory.
-
Otherwise, initdir specifies the initial directory
-
If the application has used an Open or Save As dialog box in the past, the path most recently used is selected as the initial directory. However, if an application is not run for a long time, its saved path is discarded.
-
If initdir is NULL and the current directory contains any files of the specified filter types, the initial directory is the current directory.