I know clicking mouse will automatically set status to indicate a user select a row from a list control. Now I want to use program to force a selection on a row. What is the best way to do this? Thanks.
Printable View
I know clicking mouse will automatically set status to indicate a user select a row from a list control. Now I want to use program to force a selection on a row. What is the best way to do this? Thanks.
You can use this method of the CListCtrl :
SetItemState(nRow, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);