I would like to know how can I add columns to a clistview and have the column be drawn a particular size so that I can see the title that I gave the column.
Printable View
I would like to know how can I add columns to a clistview and have the column be drawn a particular size so that I can see the title that I gave the column.
Hi
Try it like that to insert the colums (CListCtrl needs to be in (REPORT style)
CListCtrl* pLC;
pLC = (CListCtrl*) GetDlgItem(IDC_YOURID);
pLC->InsertColumn(0, "...");
pLC->InsertColumn(1, "...");
pLC->InsertColumn(2, "...");
pLC->SetColumnWidth(0, 120);
pLC->SetColumnWidth(1, 75);
pLC->SetColumnWidth(2, 195);
cu
--
-=SKULK=-
Thanks for the help. It solved my problem. I have another question though. I am now trying to insert items and have been able to get some in my listview class, but they go straignt down, but need them to go down and across. How can I do that?
Hi Delbert
Use SetItem(Item, Subitem,....) to set the subitem.
have a look at MSDN CListCtrl - class members for description.
cu
--
-=SKULK=-