Fix append extension when saving with Return (win 7)

For some reason, the file name ComboBox isn't present when enumerating windows in OnFolderChange().
Because of that, we can't call onPreFileOk() in keyboard hook procedure.
Fix that by retrying window search in OnSelectionChange() if we didn't find them previously.

Fix #11305, fix #11355
This commit is contained in:
mere-human 2022-03-07 22:38:04 +02:00 committed by Don Ho
parent 4593293b4d
commit 53cbe1c227
1 changed files with 3 additions and 1 deletions

View File

@ -269,8 +269,10 @@ public:
}
IFACEMETHODIMP OnSelectionChange(IFileDialog*) override
{
// This event isn't triggered in an empty folder.
// This event may not be triggered in an empty folder (Windows 10+).
// Dialog startup calling order: 4. Main window is shown.
if (!foundControls())
findControls();
return S_OK;
}
IFACEMETHODIMP OnShareViolation(IFileDialog*, IShellItem*, FDE_SHAREVIOLATION_RESPONSE*) override