I'm developing a simple address book application which displays it's entries in a listview control. The entries are loaded from a file and stored in a array. My problem is I can't find a way to link the listview with the array (assign each item in the listview an ID so I can find it in the array). I've read about virtual listviews at MSDN but I find it too difficult for me to implement in my application. Isn't there any other way to do this ? (I don't need sample code, just some ideas). Thanks.
webspy
0
Newbie Poster
Recommended Answers
Jump to Postare you using MFC CListView class? or CListCtrl class? the InsertItem() method returns an integer that is the ID for that item. You can then call SetItemData() to connect the row number of your array to that item. Then when the user selects an item your program should call GetItemData() …
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
webspy
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.