title: How to add checkboxes in multiple columns in VC++
body: <p>I am new to the Visual C++, I am using Visual C++ 2005, I want to show  some records in report where I am using <code>ListControl</code>. My single entry of records contains two boolean fields so that each row in the <code>ListControl</code> are to be represented with the Check boxes. In short there will be two checkboxes in each row. I used the <code>ListControl</code> but I found that there comes only one checkbox for each entry. So can anybody please explain how I can add multiple columns of checkboxes in <code>ListControl</code>, also what other classes I can use for doing same thing in visual C++. I implemented <code>InitDialog</code> as:</p>
  
  <pre><code>BOOL MyRecords::OnInitDialog()
  {
      CDialog::OnInitDialog();
  
      m_listCtrl.SetExtendedStyle(LVS_EX_CHECKBOXES);
      m_listCtrl.InsertColumn(1,"First-Bool");
      m_listCtrl.SetColumnWidth(0, 70);
  
      UInt16 i = 0;
      CString pcid;
  
      for ( ; i &lt;= 503; i++) {
          pcid.Format(_T("%d"), i);
          m_listCtrl.InsertItem(i, pcid);
      }
  
      return true;
  }
  </code></pre>