Try and extend it :)
void CMainForm::OnInitialUpdate()
{
UpdateData(FALSE);
m_cList.InsertColumn(0, _T("col 1"), LVCFMT_LEFT, 200);
m_cList.InsertColumn(1, _T("col 2"), LVCFMT_LEFT, 200);
m_cList.InsertItem(0, _T("item 1"));
m_cList.SetItemText(0, 1, _T("comment 1"));
m_cList.InsertItem(1, _T("item 2"));
m_cList.SetItemText(1, 1, _T("comment 2"));
m_cList.InsertItem(2, _T("item 3"));
m_cList.SetItemText(2, 1, _T("comment 3"));
m_cList.InsertItem(3, _T("item 4"));
m_cList.SetItemText(3, 1, _T("comment 4"));
}
void CColoredListReport::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CDC* pDC;
pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
switch (lpDrawItemStruct->itemAction) {
case ODA_DRAWENTIRE:
CRect cRect(lpDrawItemStruct->rcItem);
cRect.DeflateRect(0, 0, 1, 1);
pDC->FillSolidRect(cRect, RGB(255, 249, 121));
pDC->MoveTo(cRect.left, cRect.bottom);
pDC->LineTo(cRect.right, cRect.bottom);
pDC->LineTo(cRect.right, cRect.top -1);
CRect cSubItemRect;
GetSubItemRect(lpDrawItemStruct->itemID, 0, LVIR_LABEL, cSubItemRect);
pDC->DrawText(GetItemText(0, 0), cSubItemRect, DT_CENTER|DT_VCENTER);
GetSubItemRect(lpDrawItemStruct->itemID, 1, LVIR_LABEL, cSubItemRect);
pDC->MoveTo(cSubItemRect.TopLeft());
pDC->LineTo(cSubItemRect.left, cSubItemRect.bottom);
pDC->DrawText(GetItemText(0, 1), cSubItemRect, DT_CENTER|DT_VCENTER);
break;
}
}