Skip to content

Commit

Permalink
CHexCtrl::ParentNotify fix for wrong hwnd.
Browse files Browse the repository at this point in the history
  • Loading branch information
jovibor committed May 16, 2024
1 parent 869a78b commit 6ac55a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HexCtrl/src/CHexCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4848,8 +4848,8 @@ void CHexCtrl::OnModifyData()
template<typename T> requires std::is_class_v<T>
void CHexCtrl::ParentNotify(const T& t)const
{
if (const auto hwnd = ::GetParent(m_hWnd); hwnd != nullptr) {
::SendMessageW(m_hWnd, WM_NOTIFY, GetDlgCtrlID(), reinterpret_cast<LPARAM>(&t));
if (const auto hWndParent = ::GetParent(m_hWnd); hWndParent != nullptr) {
::SendMessageW(hWndParent, WM_NOTIFY, GetDlgCtrlID(), reinterpret_cast<LPARAM>(&t));
}
}

Expand Down

0 comments on commit 6ac55a0

Please sign in to comment.