CWnd::GetScrollRange
Visual Studio 2010
Copies the current minimum and maximum scroll-bar positions for the given scroll bar to the locations specified by lpMinPos and lpMaxPos.
void GetScrollRange( int nBar, LPINT lpMinPos, LPINT lpMaxPos ) const;