nomad
2006-10-04 12:42:01 UTC
According to the documentation, GetTopIndex() should return the index of the
topmost visible item in a list control when the list control is in list view
or report mode.
I have a virtual list control (i.e., the data are supplied by my app). I
have to occasionally rebuild the list (for reasons that are not germane), and
before I rebuild the contents of the list, I get the topmost current item, so
that I can restore it to the top after I'm done (using EnsureVisible()).
I've noticed that occasionally I get a negative value out of GetTopIndex().
Why should that happen, and what does it mean?
topmost visible item in a list control when the list control is in list view
or report mode.
I have a virtual list control (i.e., the data are supplied by my app). I
have to occasionally rebuild the list (for reasons that are not germane), and
before I rebuild the contents of the list, I get the topmost current item, so
that I can restore it to the top after I'm done (using EnsureVisible()).
I've noticed that occasionally I get a negative value out of GetTopIndex().
Why should that happen, and what does it mean?