I’m trying to delete columns in a CExtListCtrl and I get an Assertion. I’m using 2.85 version. This assertion is from the next lines:
case HDM_DELETEITEM:
{
ASSERT( m_arrExtendedData.GetSize() == GetItemCount() );
m_arrExtendedData.RemoveAt( ( int ) wParam );
ASSERT( m_arrExtendedData.GetSize() == GetItemCount() );
_CancelActions();
}
break;
located in the file:
extcontrolscommon.cpp
belonging to the function:
LRESULT CExtHeaderCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
I use DeleteColumn(0) from CListCtrl to remove column number 0 (but I have also the same problem trying to delete any column)
I think the second assertion (the one in red) must be wrong and it must be like:
ASSERT( m_arrExtendedData.GetSize() == GetItemCount() - 1 );
Is it right?. Or I’m doing something incorrect?