title: Error deleting first column in CListCtrl
body: <p>I am generating a CListCtrl in Report view (MFC). It loads fine and I can reorder columns by dragging the headers. I've made it so clicking a column header deletes the column - again this works fine except for the first (leftmost) column. Here the header is deleted but the data underneath doesn't change - in fact the data from the last column is deleted:</p>
  
  <p>Before :</p>
  
  <pre><code>Header1    Header2     Header3
  
   Data1      Data2       Data3
  </code></pre>
  
  <p>After trying to delete first column :</p>
  
  <pre><code>Header2     Header3
  
   Data1       Data2
  </code></pre>
  
  <p>Having created the columns to begin with, I'm setting up the rest of       the table like this:</p>
  
  <pre><code>void MyClass::InsertItem(int x, int y, CString &amp;str)
  {
  
      LVITEM lvi;
      lvi.mask = LVIF_TEXT;
      lvi.iItem = y;
      lvi.iSubItem = x;
      lvi.pszText = (LPTSTR)(LPCTSTR)(str);
      int result;
      if(x == 0)    {
          result = mCSVListCtrl.InsertItem(&amp;lvi); 
      }
      else {
          result = mCSVListCtrl.SetItem(&amp;lvi); 
      }
  }
  </code></pre>
  
  <p>which seems to create the table OK. Then when a header is clicked:</p>
  
  <pre><code>void MyClass::OnLvnColumnclickList(NMHDR *pNMHDR, LRESULT *pResult)
  {
      LPNMLISTVIEW pNMLV = reinterpret_cast&lt;LPNMLISTVIEW&gt;(pNMHDR);
  
      mCSVListCtrl.DeleteColumn(pNMLV-&gt;iSubItem);// This IS getting zero
  
      *pResult = 0;
  }
  </code></pre>