Share via


CRichEditCtrl::GetFirstVisibleLine

Determines the topmost visible line in this CRichEditCtrl object.

int GetFirstVisibleLine( ) const;

Return Value

Zero-based index of the uppermost visible line in this CRichEditCtrl object.

Remarks

For more information, see EM_GETFIRSTVISIBLELINE in the Windows SDK.

Example

int nFirstVisible = m_myRichEditCtrl.GetFirstVisibleLine();

// Scroll the rich edit control so that the first visible line
// is the first line of text.
if (nFirstVisible > 0)
{
   m_myRichEditCtrl.LineScroll(-nFirstVisible, 0);
}

Requirements

Header: afxcmn.h

See Also

Reference

CRichEditCtrl Class

Hierarchy Chart

CRichEditCtrl::GetLine

CRichEditCtrl::GetLineCount

Other Resources

CRichEditCtrl Members