CustomFileDialog: Focus the file name when file already exists

Fix #11630, close 11631
This commit is contained in:
mere-human 2022-05-03 18:32:32 +03:00 committed by Don Ho
parent ef9e836903
commit ccbf08dc98
1 changed files with 4 additions and 0 deletions

View File

@ -317,6 +317,10 @@ public:
IFACEMETHODIMP OnOverwrite(IFileDialog*, IShellItem*, FDE_OVERWRITE_RESPONSE*) override
{
// Called when a file with a given name already exists.
// Focus the file name edit box to make it easier to pick a new name.
if (_hwndNameEdit)
SetFocus(_hwndNameEdit);
return S_OK;
}