// OnInitDialog() of my VC++ program // I setup a listctrl variable like this: <pre>::ZeroMemory(&item, sizeof(item)); item.mask = LVIF_TEXT; item.pszText = _T(""); item.iItem = 0; item.iImage = 0; item.state = 0 DWORD dwEXStyle = m_ListCtrl.GetExtendedStyle(); m_ListCtrl.SetExtendedStyle(dwEXStyle | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER); // And to move data to listctrl,I made one new row by InsertItem. ::ZeroMemory(&item, sizeof(item)); item.mask = LVIF_TEXT; item.pszText = _T(""); item.iItem = i; item.iImage = 0; item.state = 0;// LVIS_SELECTED | LVIS_FOCUSED; int NewRow = m_List_.InsertItem(&item); // Next, I move data value to each column by SetItemText like this: /* SEQ */ strTmp = logseq; m_ListCtrl.SetItemText(i, 0, strTmp); /* Next columns */ ... ... ... // At last, I focus newrow by EnsureVisible... m_ListCtrl.EnsureVisible(NewRow, TRUE); // And every 1000 row, I clear all screen by DeleteAllItems() if (row_count_ % 1000 == 0) { m_ListCtrl.DeleteAllItems(); row_count_ = 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)