From 0e9e6aaf3a3a1a34425896df394a815a2391803a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Aug 2021 00:24:24 +0200 Subject: [PATCH] Set "subitem" argument of HitTest() to -1 in generic wxListCtrl Sub-item hit testing is still not implemented, but at least initialize the output parameter to the documented value instead of leaving some junk in it. --- src/generic/listctrl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index da822d8512..bae4eba6bf 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -5544,9 +5544,12 @@ long wxGenericListCtrl::FindItem( long WXUNUSED(start), const wxPoint& pt, return m_mainWin->FindItem( pt ); } -// TODO: sub item hit testing -long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *) const +long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *col) const { + // TODO: sub item hit testing + if ( col ) + *col = -1; + return m_mainWin->HitTest( (int)point.x, (int)point.y, flags ); }