Scroll bars!
-
G'day all! I have been using CRichEditCtrl class and every 20ms or so, I add things on to the display using this class. So you can imagine there's a whole heap of lines in the display. I have been trying very hard to make sure that the Vertical Scroll Bar is placed at the latest updated position. Could anyone help me with this one? Any help will be appreciated! This above all, to thine own self be TRUE. William Shakespeare
-
G'day all! I have been using CRichEditCtrl class and every 20ms or so, I add things on to the display using this class. So you can imagine there's a whole heap of lines in the display. I have been trying very hard to make sure that the Vertical Scroll Bar is placed at the latest updated position. Could anyone help me with this one? Any help will be appreciated! This above all, to thine own self be TRUE. William Shakespeare
I didn't try the following but I believe it should work: 1) Call
long GetTextLength()
to get number character 2) Calllong LineFromChar( long nIndex )
to get line index 3) You may want to callLineLength()
to get line length 4) CallLineScroll()
by removing the offset of theGetFirstVisibleLine( )
.CRichEditCtrl ctrl; // you have something like that somewhere...
int nLine = ctrl.LineFromChar(ctrl.GetTextLength());
ctrl.LineScroll(nLine-ctrl.GetFirsVisibleLine());Good luck! One good thing about getting older, you don't lose the ages you've been!
-
I didn't try the following but I believe it should work: 1) Call
long GetTextLength()
to get number character 2) Calllong LineFromChar( long nIndex )
to get line index 3) You may want to callLineLength()
to get line length 4) CallLineScroll()
by removing the offset of theGetFirstVisibleLine( )
.CRichEditCtrl ctrl; // you have something like that somewhere...
int nLine = ctrl.LineFromChar(ctrl.GetTextLength());
ctrl.LineScroll(nLine-ctrl.GetFirsVisibleLine());Good luck! One good thing about getting older, you don't lose the ages you've been!