CEdit::GetFirstVisibleLine
Call this function to determine the topmost visible line in an edit control.
int GetFirstVisibleLine( ) const;
Return Value
The zero-based index of the topmost visible line. For single-line edit controls, the return value is 0.
Remarks
For more information, see EM_GETFIRSTVISIBLELINE in the Windows SDK.
Example
int nFirstVisible = m_myEdit.GetFirstVisibleLine();
// Scroll the edit control so that the first visible line
// is the first line of text.
if (nFirstVisible > 0)
{
m_myEdit.LineScroll(-nFirstVisible, 0);
}
Requirements
Header: afxwin.h