Skip to content

Commit 6d05b5a

Browse files
committed
Add RunAsEnableAutoComplete setting
1 parent 9569b6b commit 6d05b5a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ProcessHacker/runas.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,13 +977,14 @@ INT_PTR CALLBACK PhpRunAsDlgProc(
977977

978978
PhCenterWindow(hwndDlg, PhMainWndHandle);
979979

980+
if (PhGetIntegerSetting(L"RunAsEnableAutoComplete"))
980981
{
981982
COMBOBOXINFO info = { sizeof(COMBOBOXINFO) };
982983

983984
if (SendMessage(context->ProgramComboBoxWindowHandle, CB_GETCOMBOBOXINFO, 0, (LPARAM)&info))
984985
{
985-
if (SHAutoComplete)
986-
SHAutoComplete(info.hwndItem, SHACF_DEFAULT);
986+
if (SHAutoComplete_Import())
987+
SHAutoComplete_Import()(info.hwndItem, SHACF_DEFAULT);
987988
}
988989
}
989990

@@ -2619,13 +2620,14 @@ INT_PTR CALLBACK PhpRunFileWndProc(
26192620
PhpAddProgramsToComboBox(context->ComboBoxHandle);
26202621
ComboBox_SetCurSel(context->ComboBoxHandle, 0);
26212622

2623+
if (PhGetIntegerSetting(L"RunAsEnableAutoComplete"))
26222624
{
26232625
COMBOBOXINFO info = { sizeof(COMBOBOXINFO) };
26242626

26252627
if (SendMessage(context->ComboBoxHandle, CB_GETCOMBOBOXINFO, 0, (LPARAM)& info))
26262628
{
2627-
if (SHAutoComplete && info.hwndItem)
2628-
SHAutoComplete(info.hwndItem, SHACF_DEFAULT);
2629+
if (SHAutoComplete_Import() && info.hwndItem)
2630+
SHAutoComplete_Import()(info.hwndItem, SHACF_DEFAULT);
26292631
}
26302632
}
26312633

ProcessHacker/settings.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ VOID PhAddDefaultSettings(
152152
PhpAddStringSetting(L"ProcStatPropPageGroupStates", L"");
153153
PhpAddStringSetting(L"ProgramInspectExecutables", L"peview.exe \"%s\"");
154154
PhpAddIntegerSetting(L"PropagateCpuUsage", L"0");
155+
PhpAddIntegerSetting(L"RunAsEnableAutoComplete", L"0");
155156
PhpAddStringSetting(L"RunAsProgram", L"");
156157
PhpAddStringSetting(L"RunAsUserName", L"");
157158
PhpAddIntegerSetting(L"RunFileDlgState", L"0");

0 commit comments

Comments
 (0)