How to prevent GetOpenFileName from changing the current directory while the dialog is shown?
问题 GetOpenFileName (for questionable reasons) changes the current directory of an application while the dialog is shown. This can be reset on dialog closure by specifying OFN_NOCHANGEDIR as dialog initialization flag: OFN_NOCHANGEDIR Restores the current directory to its original value if the user changed the directory while searching for files. Setting this flag, however, doesn't prevent the function from changing the current directory while the explorer dialog is shown . This is an issue in