GetFirstVisibleLine
Determines the topmost visible line in this RichEdit control.
int GetFirstVisibleLine( )
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.
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); }
RichEdit::LineScroll
Control.h