Archived

This topic is now archived and is closed to further replies.

DisKordCoder

ListViews in MFC ?!!?

Recommended Posts

DisKordCoder    122
Hi all, ive got a little prob with a ListView. Ive setup my Columns ok, and i can now insert data into the listview using: InsertItem(int index, char* String) but, this will only print into the first column. How do i select the column to write to?? Any help will do thanks!

Share this post


Link to post
Share on other sites
felisandria    739
BOOL SetItemText( int nItem, int nSubItem, LPTSTR lpszText );

nItem is the row number
nSubItem is the column
lpszText is the text you wish to place in that position.

If you are using a CListView, perform this on the CListCtrl reference you get when you use GetListCtrl();

-fel

Share this post


Link to post
Share on other sites