2.2.6.27.4 RichEdit::GetFirstVisibleLine

Description

Determines the topmost visible line in this RichEdit control.

Syntax

int GetFirstVisibleLine( )

Parameters

Return

Zero-based index of the uppermost visible line in this RichEdit control.

Remarks

Call this function to determine the topmost

visible line in this RichEdit control.

Examples

EX1

#include <..\OriginLab\DialogEx.h>
#define IDC_RICHEDIT1 1001

void RichEdit_GetFirstVisibleLine(Dialog& EditBoxes)
{
	RichEdit richEdit = EditBoxes.GetItem(IDC_RICHEDIT1);
	int nFirstVisible = richEdit.GetFirstVisibleLine();

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

Remark

See Also

RichEdit::LineScroll

Header to Include

Control.h