From 2c9e77d089c510273df2cadc63aa53510ea39276 Mon Sep 17 00:00:00 2001 From: katsuhisa yuasa Date: Wed, 31 Jul 2024 22:44:52 +0900 Subject: [PATCH] =?UTF-8?q?SHAutoComplete=E9=96=A2=E6=95=B0=E3=82=92?= =?UTF-8?q?=E4=BD=BF=E3=81=A3=E3=81=9F=E3=83=95=E3=82=A9=E3=83=AB=E3=83=80?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E3=81=AE=E5=85=A5=E5=8A=9B=E8=A3=9C=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sakura_core/apiwrap/StdControl.h | 10 ++++++++++ sakura_core/dlg/CDlgGrep.cpp | 3 +++ 2 files changed, 13 insertions(+) diff --git a/sakura_core/apiwrap/StdControl.h b/sakura_core/apiwrap/StdControl.h index 0ac3786f46..f02c60ff0a 100644 --- a/sakura_core/apiwrap/StdControl.h +++ b/sakura_core/apiwrap/StdControl.h @@ -41,6 +41,7 @@ UNICODE版では問題無いが、ANSI版では設定の前にコード変換す #include #include +#include #include "mem/CNativeW.h" #include @@ -219,6 +220,15 @@ namespace ApiWrap{ { ::SendMessage( hwndCombo, CB_GETEDITSEL, WPARAM( &dwSelStart ), LPARAM( &dwSelEnd ) ); } + inline void Combo_SHAutoComplete( HWND hwndCombo, DWORD dwFlags ) + { + COMBOBOXINFO comboInfo; + comboInfo.cbSize = sizeof(comboInfo); + if (0 != GetComboBoxInfo(hwndCombo, &comboInfo)) + { + SHAutoComplete(comboInfo.hwndItem, dwFlags); + } + } // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // // リストボックス // diff --git a/sakura_core/dlg/CDlgGrep.cpp b/sakura_core/dlg/CDlgGrep.cpp index 3c8bd1b625..cf8ff7e208 100644 --- a/sakura_core/dlg/CDlgGrep.cpp +++ b/sakura_core/dlg/CDlgGrep.cpp @@ -323,6 +323,9 @@ BOOL CDlgGrep::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam ) Combo_SetExtendedUI( GetItemHwnd( IDC_COMBO_EXCLUDE_FILE ), TRUE ); Combo_SetExtendedUI( GetItemHwnd( IDC_COMBO_EXCLUDE_FOLDER ), TRUE ); + /* 入力補完を機能させる */ + Combo_SHAutoComplete(GetItemHwnd( IDC_COMBO_FOLDER ), SHACF_FILESYS_DIRS|SHACF_AUTOAPPEND_FORCE_ON); + /* ダイアログのアイコン */ //2002.02.08 Grepアイコンも大きいアイコンと小さいアイコンを別々にする。 HICON hIconBig, hIconSmall;