类似VC6.0调试窗口的自动滚动条问题 随着程序的运行,调试窗口的文字不自动往下滚,望高手指教!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void CTestDlg::AppResultString(CString str){ CEdit *pEdit = (CEdit *)GetDlgItem(IDC_OUTPUT); // Edit控件 CString strBuffer; // current contents of edit control if (pEdit->GetLineCount() < 100 ) // 100是限制最大行数 pEdit->GetWindowText (strBuffer); // Append string if (!strBuffer.IsEmpty()) strBuffer += "\r\n"; COleDateTime dt = COleDateTime::GetCurrentTime(); CString time = dt.Format("%H:%M:%S"); strBuffer += time; strBuffer += " "; strBuffer += str; pEdit->SetWindowText (strBuffer); // Scroll the edit control pEdit->LineScroll ( pEdit->GetLineCount(), 0);} 下拉列表框与列表控件响应的问题 PrintWindow无法截取DirectX窗口的屏幕 mfc对话框程序界面如何修改静态文本的背景 如何让编译出的新版dll,可以直接替换旧版本的dll 基本的问题!高手进来详解一下! 编 辑 框 控 件 为 什 么 只 能 关 连有小数点的变量???? 求boundschecker下载地址 如何用串口发送和接收文件? CPP的入口函数是什么? 求购:odbc中动态绑定域的方法 如何扫描本机的端口? CListCtrl::InsertItem问题
{
CEdit *pEdit = (CEdit *)GetDlgItem(IDC_OUTPUT); // Edit控件
CString strBuffer; // current contents of edit control
if (pEdit->GetLineCount() < 100 ) // 100是限制最大行数
pEdit->GetWindowText (strBuffer);
// Append string
if (!strBuffer.IsEmpty())
strBuffer += "\r\n";
COleDateTime dt = COleDateTime::GetCurrentTime();
CString time = dt.Format("%H:%M:%S");
strBuffer += time;
strBuffer += " ";
strBuffer += str;
pEdit->SetWindowText (strBuffer);
// Scroll the edit control
pEdit->LineScroll ( pEdit->GetLineCount(), 0);
}