怎样才能使接收到的数据在编辑框中往上滚动?

dj_sky 2003-03-03 06:38:49
建立了一个基于对话框的MFC应用程序,在主对话框中有一个编辑框,用于显示接收到的数据,现在我有一个问题,怎样才能使接收到的数据往上滚动,而最新的数据在编辑框的最下面,让我可以看到最新的数据?
...全文
27 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Leoparder 2003-03-03
  • 打赏
  • 举报
回复
用CEdit的这个函数:

void LineScroll( int nLines, int nChars = 0 );

Parameters:

nLines

Specifies the number of lines to scroll vertically.

nChars

Specifies the number of character positions to scroll horizontally. This value is ignored if the edit control has either the ES_RIGHT or ES_CENTER style.

Remarks

Call this function to scroll the text of a multiple-line edit control.

This member function is processed only by multiple-line edit controls.

The edit control does not scroll vertically past the last line of text in the edit control. If the current line plus the number of lines specified by nLines exceeds the total number of lines in the edit control, the value is adjusted so that the last line of the edit control is scrolled to the top of the edit-control window.



15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧