MSDN article on CListCtrl::GetTopIndex() contains a code sample that goes like this:
// Make sure the focus is set to the list view control.
listControl->SetFocus();
// Select all of the items that are completely visible.
int topIndex = listControl->GetTopIndex();
int lastIndex = listControl+ listControl->GetCountPerPage();
//then there开发者_运维问答's a for-loop for the items in range from topIndex to lastIndex
Why is the comment insisting on the call to SetFocus()?
加载中,请稍侯......
精彩评论