From ed02f41af5a6013916bf37d749042bfae6b61bb2 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 25 Sep 2020 15:59:30 +0900 Subject: [PATCH] [SHELL32] Call SHAutoComplete on 'Run' dialog CORE-9281 --- dll/win32/shell32/dialogs/dialogs.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/dialogs/dialogs.cpp b/dll/win32/shell32/dialogs/dialogs.cpp index 3d584480cf7..aa71de0b1f4 100644 --- a/dll/win32/shell32/dialogs/dialogs.cpp +++ b/dll/win32/shell32/dialogs/dialogs.cpp @@ -500,6 +500,8 @@ static void EnableOkButtonFromEditContents(HWND hwnd) static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { RUNFILEDLGPARAMS *prfdp = (RUNFILEDLGPARAMS *)GetWindowLongPtrW(hwnd, DWLP_USER); + HWND hwndCombo, hwndEdit; + COMBOBOXINFO ComboInfo; switch (message) { @@ -538,9 +540,16 @@ static INT_PTR CALLBACK RunDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARA // SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)prfdp->hIcon); SendMessageW(GetDlgItem(hwnd, IDC_RUNDLG_ICON), STM_SETICON, (WPARAM)prfdp->hIcon, 0); - FillList(GetDlgItem(hwnd, IDC_RUNDLG_EDITPATH), NULL, 0, (prfdp->uFlags & RFF_NODEFAULT) == 0); + hwndCombo = GetDlgItem(hwnd, IDC_RUNDLG_EDITPATH); + FillList(hwndCombo, NULL, 0, (prfdp->uFlags & RFF_NODEFAULT) == 0); EnableOkButtonFromEditContents(hwnd); - SetFocus(GetDlgItem(hwnd, IDC_RUNDLG_EDITPATH)); + + ComboInfo.cbSize = sizeof(ComboInfo); + GetComboBoxInfo(hwndCombo, &ComboInfo); + hwndEdit = ComboInfo.hwndItem; + SHAutoComplete(hwndEdit, SHACF_FILESYSTEM | SHACF_FILESYS_ONLY | SHACF_URLALL); + + SetFocus(hwndCombo); return TRUE; case WM_COMMAND: