https://git.reactos.org/?p=reactos.git;a=commitdiff;h=62b13979f596812c722026...
commit 62b13979f596812c722026a0a60f2409e519a649 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Fri Apr 2 11:06:01 2021 +0900 Commit: GitHub noreply@github.com CommitDate: Fri Apr 2 11:06:01 2021 +0900
[NEWDEV] Enable auto-completion on Hardware Wizard (#3573)
Realize auto-completion on Hardware Wizard. CORE-9281 --- dll/win32/newdev/CMakeLists.txt | 2 +- dll/win32/newdev/wizard.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dll/win32/newdev/CMakeLists.txt b/dll/win32/newdev/CMakeLists.txt index 1b4b76d0b65..3ff64749177 100644 --- a/dll/win32/newdev/CMakeLists.txt +++ b/dll/win32/newdev/CMakeLists.txt @@ -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) diff --git a/dll/win32/newdev/wizard.c b/dll/win32/newdev/wizard.c index d682964c85a..739795fef6e 100644 --- a/dll/win32/newdev/wizard.c +++ b/dll/win32/newdev/wizard.c @@ -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; }