From df44223ecb360c9d2a2edcd6fd7ce4adc86b6588 Mon Sep 17 00:00:00 2001 From: Kengo Ide Date: Wed, 9 Dec 2020 21:44:16 +0900 Subject: [PATCH] =?UTF-8?q?CBS=5FDROPDOWNLIST=E3=81=A7=E3=81=82=E3=82=8B?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=9C=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9?= =?UTF-8?q?=E3=82=92=E3=82=B5=E3=83=96=E3=82=AF=E3=83=A9=E3=82=B9=E5=8C=96?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sakura_core/dlg/CDialog.cpp | 2 ++ sakura_core/dlg/CDlgOpenFile_CommonFileDialog.cpp | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sakura_core/dlg/CDialog.cpp b/sakura_core/dlg/CDialog.cpp index 7ec031ba25..05510a80aa 100644 --- a/sakura_core/dlg/CDialog.cpp +++ b/sakura_core/dlg/CDialog.cpp @@ -809,9 +809,11 @@ LRESULT CALLBACK SubEditProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, void CDialog::SetComboBoxDeleter(HWND hwndCtl, CRecent* pRecent) { assert(pRecent); + assert((::GetWindowLongPtr(hwndCtl, GWL_STYLE) & 0b11) != CBS_DROPDOWNLIST); COMBOBOXINFO info = { sizeof(COMBOBOXINFO) }; if (!::GetComboBoxInfo(hwndCtl, &info)) return; + assert(info.hwndCombo != info.hwndItem); ::SetWindowSubclass(info.hwndItem, SubEditProc, 0, (DWORD_PTR)pRecent); } diff --git a/sakura_core/dlg/CDlgOpenFile_CommonFileDialog.cpp b/sakura_core/dlg/CDlgOpenFile_CommonFileDialog.cpp index 2605579771..285255e562 100644 --- a/sakura_core/dlg/CDlgOpenFile_CommonFileDialog.cpp +++ b/sakura_core/dlg/CDlgOpenFile_CommonFileDialog.cpp @@ -370,9 +370,6 @@ UINT_PTR CALLBACK OFNHookProc( /* ビューモードの初期値セット */ ::CheckDlgButton( pData->m_hwndOpenDlg, chx1, pData->m_bViewMode ); - - CDialog::SetComboBoxDeleter(pData->m_hwndComboMRU, &pData->m_cRecentFile); - CDialog::SetComboBoxDeleter(pData->m_hwndComboOPENFOLDER, &pData->m_cRecentFolder); } break;