CRichEditCtrl::GetFirstVisibleLine
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

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 Platform SDK.

Example

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;

int nFirstVisible = pmyRichEditCtrl->GetFirstVisibleLine();

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

See Also

CRichEditCtrl Overview | Class Members | Hierarchy Chart | CRichEditCtrl::GetLine | CRichEditCtrl::GetLineCount

Show:
© 2016 Microsoft