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

コンボボックスのサブクラス化に関連するクラッシュバグの修正 #1481

Merged
merged 2 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions sakura_core/dlg/CDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
berryzplus marked this conversation as resolved.
Show resolved Hide resolved

COMBOBOXINFO info = { sizeof(COMBOBOXINFO) };
if (!::GetComboBoxInfo(hwndCtl, &info))
return;
assert(info.hwndCombo != info.hwndItem);
berryzplus marked this conversation as resolved.
Show resolved Hide resolved
::SetWindowSubclass(info.hwndItem, SubEditProc, 0, (DWORD_PTR)pRecent);
}
3 changes: 0 additions & 3 deletions sakura_core/dlg/CDlgOpenFile_CommonFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down