From 610c16498816cf007e96ded5c9ede866b08a1a74 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Dec 2017 17:14:56 +0100 Subject: [PATCH] Always let DefWndProc() process column resizing in wxListCtrl If we don't pass these messages to it, the selected items highlight rectangle doesn't get updated when the columns are resized when using visual themes, as could be seen in the listctrl sample. While this did work if the wxEVT_LIST_COL_DRAGGING event handler skipped the event, prefer to not require doing this as things work without this call to wxEvent::Skip() under the other platforms and even MSW with themes disabled. Closes #18032. --- src/msw/listctrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 5896a1db7d..ad763145ba 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -2716,6 +2716,12 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // --------------- switch ( nmhdr->code ) { + case HDN_ITEMCHANGING: + // Always let the default handling of this event take place, + // otherwise the selected items are not redrawn to correspond to + // the new column widths, see #18032. + return false; + case LVN_DELETEALLITEMS: // always return true to suppress all additional LVN_DELETEITEM // notifications - this makes deleting all items from a list ctrl