Re: About SetRedraw(FALSE) And EnsureVisible()



Event after call SetRedraw(FALSE);, EnsureVisible() will cause CListCtrl
udpate display immediately. SetRedraw() doesn't work when call
EnsureVisible()?
Who can tell me why?

Only the designer of the code really!

If you think about it, you could argue either way how EnsureVisible
should work - ensure something is visible (regardless of the redraw
flag which the documentation says is "useful if an application must
add several items to a list box"), or obey the redraw flag.

Since it behaves the way it does, your only solution is to work around
that behaviour as best as possible.

And another question, how to set the CListControl's TopIndex? I only found
a GetTopIndex() function, but no SetTopIndex().

I don't know.

Dave
.