index of selected item in listctrl
-
int itemIndex = m_lstFoo.GetNextItem(-1, LVNI_SELECTED); Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
-
int itemIndex = m_lstFoo.GetNextItem(-1, LVNI_SELECTED); Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
Thanks, I am able to get the index. I have 1 more Qs. I have written an message hanler for the list control for the message LVN_ENDLABELEDIT. After i edit the selected field , I want to put the newly typed data in it. So, i tried to use the listctrl.GetNextItem(); listctrl.GetItemText(); --- But this fucntion has the original text & not the new text and listctrl.SetItemText().
-
Thanks, I am able to get the index. I have 1 more Qs. I have written an message hanler for the list control for the message LVN_ENDLABELEDIT. After i edit the selected field , I want to put the newly typed data in it. So, i tried to use the listctrl.GetNextItem(); listctrl.GetItemText(); --- But this fucntion has the original text & not the new text and listctrl.SetItemText().
All you need to set the item text in LVN_ENDLABELEDIT handler is to return TRUE. If you're using MFC, then you need to set *pResult to TRUE. Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
-
All you need to set the item text in LVN_ENDLABELEDIT handler is to return TRUE. If you're using MFC, then you need to set *pResult to TRUE. Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group