[SHELL32] Call SHAutoComplete on 'Run' dialog

CORE-9281
This commit is contained in:
Katayama Hirofumi MZ 2020-09-25 15:59:30 +09:00
parent 0a8fb87d84
commit ed02f41af5

View file

@ -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: