Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHAutoComplete関数を使ったフォルダ位置の入力補完 #1969

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sakura_core/apiwrap/StdControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ UNICODE版では問題無いが、ANSI版では設定の前にコード変換す

#include <windows.h>
#include <Commctrl.h>
#include <shlwapi.h>
#include "mem/CNativeW.h"
#include <vector>

Expand Down Expand Up @@ -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);
}
}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// リストボックス //
Expand Down
3 changes: 3 additions & 0 deletions sakura_core/dlg/CDlgGrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading