菜鸟求助!关于edit控件的问题! 我现在想用edit 控件显示接收的数据,当前的数据不能覆盖之前的数据,就象在DOS窗口下的一样!哪一位好心人帮我一下! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 重载CEdit 例如 CHistoryEdit , 增加下面的函数void CHistoryEdit::AppendString (CString str){CString strBuffer; // current contents of edit control // Append string GetWindowText (strBuffer); if (!strBuffer.IsEmpty()) strBuffer += "\r\n"; strBuffer += str; SetWindowText (strBuffer); // Scroll the edit control LineScroll (GetLineCount(), 0);} http://www.codeguru.com/Cpp/controls/editctrl/print.php/c533/ CEdit * output; m_sShowText += "hello!\n"; //首先获得CEdit控件的句柄, output =(CEdit *) GetDlgItem(IDC_SHOWTEXT); //添加显示内容 output->SetWindowText(m_sShowText); //滚动条的位置 output->LineScroll(output->GetLineCount()); 运行时错误请教 在include中这些是什么意思? 子dialog窗口打开后,怎样使父窗口隐藏? 怎么在dll中返回字符0x00? 派生的ComboBox不能正常显示ITEM 关于自定义线程之间通过消息传递结构体变量的问题 用逆波兰表达式实现MFC编写计算器的程序出现内存不能为“read”的错误!请问有没有热心的人给予赐教,特别感谢!主要代码如下: 关于dll的路径 急 高手们来 求如何防软件识别我的硬件特征? 如何动态的让指定的菜单项、工具条按钮、变灰? 消息钩子的问题:这个问题解决不了,我过不好年了,昨天一高手解决一部分,还要请大家帮忙! 一个奇怪的问题--找不到类,请各位大虾帮忙!
void CHistoryEdit::AppendString
(CString str)
{
CString strBuffer; // current contents of edit control // Append string
GetWindowText (strBuffer);
if (!strBuffer.IsEmpty())
strBuffer += "\r\n";
strBuffer += str;
SetWindowText (strBuffer); // Scroll the edit control
LineScroll (GetLineCount(), 0);
}
CEdit * output;
m_sShowText += "hello!\n";
//首先获得CEdit控件的句柄,
output =(CEdit *) GetDlgItem(IDC_SHOWTEXT);
//添加显示内容
output->SetWindowText(m_sShowText);
//滚动条的位置
output->LineScroll(output->GetLineCount());