关于在编辑中追加文本的问题 100分送 在线等ing 我想在一个编辑框中加入追加一个文本的输入。即在以前文本的后面加入新的东东最好不要把前面的东西取出来,因为那样的话,会造成画面的闪烁(追加的很频繁) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CString txt("F"); //CEdit m_d int len = m_d.GetWindowTextLength();m_d.SetSel(len,len);m_d.ReplaceSel(txt); CDummyEdit::AddText(CString strNewText) { strNewText EnterCriticalSection(&m_Critical); GetEditCtrl().GetWindowText(strLog); strLog +=strNewText; strLog +="\r\n"; GetEditCtrl().SetWindowText( strLog ); LeaveCriticalSection(&m_Critical); }这是我以前用的,应该能满足你的要求。 字串的追加在: UpdateData(FALSE);之前完成! CString txt("F"); //CEdit m_d int len = m_d.GetWindowTextLength();m_d.SetSel(len,len);m_d.ReplaceSel(txt);---------------------完全同意,我就是这么用的,保证不闪烁,而且自动滚屏 求教 如何获取硬盘的序列号 vc中如何对16进制数进行位操作? 请教高手怎样刷新整个对话框 _CommandPtr对象执行Excute命令的返回值问题! 100急问CreateThread函数的问题 如何让CTreeCtrl的Item可以被编辑? 小弟要使用SOCKET传输文件,想使用CSocketFile类,哪位哥哥教教我啊!!!! 如何得到当前时间? 还是大的PictureBox中放小的动态创建的PictureBox控件的问题,请再帮帮我! 关于CSocket中Connect函数的问题 关于GDI+的单位问题,给100,望能解决! 小弟跪求关于用http代理登陆服务器资料
int len = m_d.GetWindowTextLength();
m_d.SetSel(len,len);
m_d.ReplaceSel(txt);
{
strNewText
EnterCriticalSection(&m_Critical);
GetEditCtrl().GetWindowText(strLog); strLog +=strNewText;
strLog +="\r\n";
GetEditCtrl().SetWindowText( strLog );
LeaveCriticalSection(&m_Critical);
}
这是我以前用的,应该能满足你的要求。
UpdateData(FALSE);
之前完成!
int len = m_d.GetWindowTextLength();
m_d.SetSel(len,len);
m_d.ReplaceSel(txt);
---------------------
完全同意,我就是这么用的,保证不闪烁,而且自动滚屏