OFN_FILEMUSTEXIST for filebox in open mode

When the user types in the name of a nonexistent file, or selects a file and then changes the folder, the `OFN_FILEMUSTEXIST` flag causes the dialog box to pop up a warning message box when the user clicks the "Open" button, instead of closing and returning a nonexistent path.
This commit is contained in:
ErrorFlynn 2019-03-05 08:33:05 -05:00 committed by GitHub
parent 92ae306994
commit 26ae1bf32e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1494,6 +1494,7 @@ namespace nana
if (!impl_->open_or_save)
ofn.Flags = OFN_OVERWRITEPROMPT; //Overwrite prompt if it is save mode
else ofn.Flags = OFN_FILEMUSTEXIST; //In open mode, user can't type name of nonexistent file
ofn.Flags |= OFN_NOCHANGEDIR;
if(impl_->allow_multi_select)
{