How to select items in a ListCtrl programmatically
-
Hi, All, How can I select item in a ListCtrl programmatically? the ListCtrl is in Report View mode. Thanks in advance
-
Hi, All, How can I select item in a ListCtrl programmatically? the ListCtrl is in Report View mode. Thanks in advance
SetItemState (idx, LVIS_SELECTED, LVIS_SELECTED);
For men use, if they have an evil turn, to write it in marble: and whoso doth us a good turn we write it in dust. -- Sir Thomas More
-
Hi, All, How can I select item in a ListCtrl programmatically? the ListCtrl is in Report View mode. Thanks in advance
Use this...
SetItemState(index, LVIS_SELECTED, LVIS_SELECTED);
... or even this:
SetItemState(index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
-
Use this...
SetItemState(index, LVIS_SELECTED, LVIS_SELECTED);
... or even this:
SetItemState(index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
Thank you very much.
-
SetItemState (idx, LVIS_SELECTED, LVIS_SELECTED);
For men use, if they have an evil turn, to write it in marble: and whoso doth us a good turn we write it in dust. -- Sir Thomas More
Thank you very much.