How can I use CListCtrl's LVS_REPORT
-
I want to use the CListCtrl's LVS_REPORT ,but I have no idea in using the CListCtrl,anyone could give me a sample or the setps? I could not understand the MSDN 's .Thank . YES, I am here.
Well, if you already have your list control on your dialog, those are the steps: (I suppose that
m_wndList
is the CListCtrlm_wndList.ModifyStyle(0, LVS_REPORT); //see CListCtrl::Create for other styles
//now have to add at least on column. We'll add 2 columns
m_wndList.InsertColumn(0, "My name");
m_wndList.InsertColumn(1, "My phone");//now we can add items, one after another.
//I use GetItemsCount to be sure that new items added at the end of list
//if you want to add at the beginning, just use 0 (zero) instead
int nItem = m_wndList.InsertItem(m_wndList.GetItemsCount(), "Philip Patrick");
m_wndList.SetItem(nItem, 1, "111-111-222222");That's all :) Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer
-
Well, if you already have your list control on your dialog, those are the steps: (I suppose that
m_wndList
is the CListCtrlm_wndList.ModifyStyle(0, LVS_REPORT); //see CListCtrl::Create for other styles
//now have to add at least on column. We'll add 2 columns
m_wndList.InsertColumn(0, "My name");
m_wndList.InsertColumn(1, "My phone");//now we can add items, one after another.
//I use GetItemsCount to be sure that new items added at the end of list
//if you want to add at the beginning, just use 0 (zero) instead
int nItem = m_wndList.InsertItem(m_wndList.GetItemsCount(), "Philip Patrick");
m_wndList.SetItem(nItem, 1, "111-111-222222");That's all :) Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer