Selecting Position in CListCtrl
-
Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.
-
Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.
CListCtrl::GetNextItem(-1, LVNI_SELECTED);
This is for single selection only. Sonork 100.41263:Anthony_Yio -
Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.
ctrl.SetItemState(index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); Roger Allen Sonork 100.10016 Death come early, death come late, It takes us all, there is no reason. For every purpose under heaven, To each a turn, to each a season. A time to weep and a time to sigh, A time to laugh and a time to cry, A time to be born and a time to die. Dust to dust and ashes to ashes, And so I end my song.
-
Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.
-
You can use CListCtrl::SetItemState for example:
SetItemState(index, LVIS_SELECTED, LVIS_SELECTED);
Thank you, guys :)