shark351
asked on
CListCtrl Item Selection??
The "List Box" in MFC has a member function that returns the index of the item selected. GetCurSel().
Can anyone tell me how to do the same thing with a List View Control(CListCtrl)
Can anyone tell me how to do the same thing with a List View Control(CListCtrl)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Chensu,
I am using VC++ 5.0
Are the functions you mentioned not available for this version??
I tried to implement them and find documentation but failed on both.
I am using VC++ 5.0
Are the functions you mentioned not available for this version??
I tried to implement them and find documentation but failed on both.
I am not sure. I don't have version 5.0 to check. You may search all the source files of MFC for the function names.
ASKER
Chensu,
Must not be available for version 5.0.
I will issue you the points since your answer is technically correct. In the meantime I'm using HitTest() to find which item I've selected.
Thanks
Must not be available for version 5.0.
I will issue you the points since your answer is technically correct. In the meantime I'm using HitTest() to find which item I've selected.
Thanks
Do the following thing to get the selected item
here m_ctrlPacketSignalListView
int l_iItemCount = m_ctrlPacketSignalListView
for(int l_iIndex = 0;l_iIndex<l_iItemCount;l_
{
if(m_ctrlPacketSignalListV
{
//the l_iIndex gives u the selected item index
break;//u can break or continue
}
}
Try it out.
VinExpert