https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ed02f41af5a6013916bf37...
commit ed02f41af5a6013916bf37d749042bfae6b61bb2 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Fri Sep 25 15:59:30 2020 +0900 Commit: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com CommitDate: Fri Sep 25 15:59:30 2020 +0900
[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: