CListCtrl myList; myList.Create(WS_CHILD | WS_VISIBLE | LVS_REPORT, rect, pParentWnd, nID);
myList.InsertColumn(0, _T("Name"), LVCFMT_LEFT, 100); myList.InsertColumn(1, _T("Age"), LVCFMT_LEFT, 50); myList.InsertColumn(2, _T("Gender"), LVCFMT_LEFT, 50); myList.InsertItem(0, _T("John")); myList.SetItemText(0, 1, _T("25")); myList.SetItemText(0, 2, _T("Male")); myList.InsertItem(1, _T("Jane")); myList.SetItemText(1, 1, _T("30")); myList.SetItemText(1, 2, _T("Female"));This code adds columns to the list control to display the name, age, and gender of each person. It then adds two items to the list and sets the item text for each column. The CListCtrl class is part of the MFC library, which is included with Microsoft Visual Studio.