An application sends an LB_GETTOPINDEX message to retrieve the index of the first visible item in a list box. Initially the item with index 0 is at the top of the list box, but if the list box contents have been scrolled another item may be at the top.
LB_GETTOPINDEX wParam = 0; // not used; must be zero lParam = 0; // not used; must be zero
This message has no parameters.
The return value is the index of the first visible item in the list box.