Fix wxListCtrl column resizing with old comctl32.dll v5

The fix for visual artefacts when resizing columns with comctl32.dll v6
introduced them when using v5 of the DLL, so apply it only conditionally
now.

See #18032, #18441.
This commit is contained in:
Vadim Zeitlin
2019-07-17 02:59:51 +02:00
parent c35075cbf0
commit 6eac636576

View File

@@ -2755,10 +2755,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;
// Always let the default handling of this event take place when
// using comctl32.dll v6, as otherwise the selected items are not
// redrawn to correspond to the new column widths, see #18032.
if ( wxApp::GetComCtl32Version() >= 600 )
return false;
break;
case LVN_DELETEALLITEMS:
// always return true to suppress all additional LVN_DELETEITEM