Есть CListCtrl контрол,
как сделать так, что бы выделялась нужная строчка, с соответствующей прокруткой скроллера?
Ну тоесть надо выделить некоторую строчку , например в середине списка,
что бы сам скроллер переехал к середине а нужная строчка выделилась бы, как буд-то я на неё кликнул
[C++] CListCtrl: Управление выделением строчек19.04.02 04:27 Автор: beetle <beetle> Статус: Member
CListCtrl::EnsureVisible
BOOL EnsureVisible( int nItem, BOOL bPartialOK );
nItem - Index of the list view item that is to be visible.
bPartialOK - Specifies whether partial visibility is acceptable.
Call this function to ensure that a list view item is at least partially visible. The list view control is scrolled if necessary. If the bPartialOK parameter is nonzero, no scrolling occurs if the item is partially visible.
Я так юзал-візіваю
Ensurevisible(pos,FALSE);
и в pos задаю номер елемента.которій нужно показать
читай МСДН =))
[C++] CListCtrl: Управление выделением строчек19.04.02 12:11 Автор: ih8u <i hate you> Статус: Member
BOOL CListCtrl::SetItemState( int nItem, UINT nState, UINT nMask);
nItem - Index of the item whose state is to be set.
nState - New values for the state bits.
nMask - Mask specifying which state bits to change.