[NEWDEV] Enable auto-completion on Hardware Wizard (#3573)

Realize auto-completion on Hardware Wizard. CORE-9281
This commit is contained in:
Katayama Hirofumi MZ 2021-04-02 11:06:01 +09:00 committed by GitHub
parent b591bd3354
commit 62b13979f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -15,6 +15,6 @@ add_library(newdev MODULE
set_module_type(newdev win32dll UNICODE)
target_link_libraries(newdev wine)
add_importlibs(newdev gdi32 comctl32 setupapi advapi32 user32 shell32 msvcrt kernel32 ntdll)
add_importlibs(newdev gdi32 comctl32 setupapi advapi32 user32 shell32 shlwapi ole32 msvcrt kernel32 ntdll)
add_pch(newdev newdev_private.h SOURCE)
add_cd_file(TARGET newdev DESTINATION reactos/system32 FOR all)

View file

@ -23,6 +23,7 @@
#include <wincon.h>
#include <cfgmgr32.h>
#include <shlobj.h>
#include <shlwapi.h>
HANDLE hThread;
@ -573,8 +574,9 @@ CHSourceDlgProc(
{
case WM_INITDIALOG:
{
HWND hwndControl;
HWND hwndControl, hwndCombo;
DWORD dwStyle;
COMBOBOXINFO info = { sizeof(info) };
/* Get pointer to the global setup data */
DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
@ -589,7 +591,11 @@ CHSourceDlgProc(
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
PopulateCustomPathCombo(GetDlgItem(hwndDlg, IDC_COMBO_PATH));
hwndCombo = GetDlgItem(hwndDlg, IDC_COMBO_PATH);
PopulateCustomPathCombo(hwndCombo);
GetComboBoxInfo(hwndCombo, &info);
SHAutoComplete(info.hwndItem, SHACF_FILESYS_DIRS);
SendDlgItemMessage(
hwndDlg,
@ -1303,6 +1309,7 @@ DisplayWizard(
PROPSHEETHEADER psh = {0};
HPROPSHEETPAGE ahpsp[IDD_MAXIMUMPAGE + 1];
PROPSHEETPAGE psp = {0};
HRESULT hr = CoInitialize(NULL); /* for SHAutoComplete */
/* zero based index */
startPage -= IDD_FIRSTPAGE;
@ -1382,5 +1389,7 @@ DisplayWizard(
DeleteObject(DevInstData->hTitleFont);
if (SUCCEEDED(hr))
CoUninitialize();
return TRUE;
}