NOVICE: List Control selecting a row...
Hi,
I have a list control, and I have an option to refresh the datas on it ( delete all and put new datas), but I would like to keep on select the text row that was selected in the list control before.
I have tried to do this ( in a loop..., while I'm inserting...):
if (iOldSelected!=-1 && IEAdr == OldAdrSelected) {
m_lcImportantIE.SetItemState(iIndex,LVIF_STATE,LVIS_FOCUSED|LVIS_SELECTED);
iOldSelected = -1;
}
But don't works, anybody can help me ?, Thanks, Bye !
Braulio
Re: NOVICE: List Control selecting a row...
Why don't you finish the loop and then select whatever you want.
Re: NOVICE: List Control selecting a row...
I have putted this, and now works:
m_lcImportantIE.SetItemState(iIndex,LVIS_FOCUSED|LVIS_SELECTED,
LVIS_FOCUSED|LVIS_SELECTED);
Is better to do it while I'm inserting the items, because then I only made one loop not too ( to find the text in the row...).
Bye !
Braulio