问两个CRichEditCtrl的问题 1.我在CRichEditCtrl中要不断的向里面追加文本,也就是在原来文本的后面再写入文本,该用什么函数?我好象没有找到 2.我要使CRichEditCtrl的垂直流动条总保持在最下方,该用怎么办? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1 给你一段我写的代码 nTextLength = m_rtfMsg.GetWindowTextLength(); m_rtfMsg.SetSel(nTextLength, nTextLength); m_rtfMsg.ReplaceSel(strShow);2 可以在对话框模板里面直接设置 to: fzd999(花差花差) 第二个问题还没有解决,在对话框模板里怎么设置?我选中了Vertical Scroll 和Auto VScroll 也不行啊? to: fzd999(花差花差) 怎么我只要调用ReplaceSer()这个函数的时候,程序运行的时候没有问题,程序一关闭它就报错,这是怎么回事? to: bhut(bhut) m_rtfMsg.ScrollWindow 这个方法的参数怎么确定? m_rtfMsg.ScrollWindow(5,10)横向滚动5,纵向滚动10 nTextLength = m_rtfMsg.GetWindowTextLength(); m_rtfMsg.SetSel(nTextLength, nTextLength); m_rtfMsg.ReplaceSel(strShow);将结束符替换为strShow也就是增加strShow 追加文本的问题我已经解决了,可是我还是不知道怎么样使VScroll总是保持在最下方? void CDlg2Dlg::OnButton7() { CString str; for(int i = 0 ; i < 100 ; i++) { for(int j= 'A' ; j < 'Z' ; j++ ) str += j; str += '\n'; } str += "end"; m_richctrl.SetWindowText(str); int nLineCount = m_richctrl.GetLineCount(); m_richctrl.LineScroll(nLineCount-5);}richctrl的多行一定要选中 richctrl的多行一定要选中否则只能显示一行 如何使用ndissetpacketflags()这个函数 如何用packet32进行基于数据链路层的数据嗅探 Windows有关GDI映射的函数,哪些函数的参数用逻辑坐标,哪些函数的参数用的是设备坐标 如何通过可移动设备盘符获取设备路径或GUID CRichEditCtrl设置行距问题 DAO访问dbf表 求助 编译时的一个错误,请各位帮忙解决 ★300分★sygate配置问题★感觉和-协议-有关★大虾请进★ 统计以下,你们用VC编写的程序最多有多少行代码? 这种网络播放怎么实现? 网络变成大人帮忙,如何实现http断点续传?
nTextLength = m_rtfMsg.GetWindowTextLength();
m_rtfMsg.SetSel(nTextLength, nTextLength);
m_rtfMsg.ReplaceSel(strShow);2 可以在对话框模板里面直接设置
横向滚动5,纵向滚动10
m_rtfMsg.SetSel(nTextLength, nTextLength);
m_rtfMsg.ReplaceSel(strShow);
将结束符替换为strShow
也就是增加strShow
{
CString str;
for(int i = 0 ; i < 100 ; i++)
{
for(int j= 'A' ; j < 'Z' ; j++ )
str += j;
str += '\n';
}
str += "end";
m_richctrl.SetWindowText(str);
int nLineCount = m_richctrl.GetLineCount();
m_richctrl.LineScroll(nLineCount-5);
}richctrl的多行一定要选中
否则只能显示一行