I want a multiline CEdit control to scroll itself downside slowly like a rolling subtitle.
So far, I use CEdit::LineScroll() in OnTimer() event. It can do a full line roll with is not as smooth as I expected. I try to replace LineScroll() by ScrollWindow() so that I can scroll the text by pixels however the ScrollWindow() function don't draw the new text lines which should be scrolled into the control.
Anyone have any idea on how to achieve this?
In case I did not describe the issue clear. I add these gifs: What LineScroll() do (and I just need it smoother):
And this is what ScrollWindow() do (the following text is cut):
Here is the code of ScrollWindow():
CRect clientRect;
m_editAns.GetClientRect(&clientRect);
m_editAns.ScrollWindow(0, -10, NULL, &clientRect);
m_editAns.UpdateWindow();
ValidateRect(&clientRect);
*PS: The project uses the CEdit control else where so I can't replace it by another control, though inheritance is acceptable.