我要在一个editbox控件里定时输出一个字符串,为这个编辑框定义了一个成员变量m_str,我想要的输出格式为: the 1th time (第0秒)
the 2nd time (第1秒)
the 3th time (第2秒)
...............
以上字符串每一秒输出一行,不能覆盖前次输出的,该怎么做啊。我用UpdateData(),可是每次都是一行,存不下以前的。
各位大哥大姐帮帮忙啊,明天就要拿给别人了,急死我了。在线等好心人。
the 2nd time (第1秒)
the 3th time (第2秒)
...............
以上字符串每一秒输出一行,不能覆盖前次输出的,该怎么做啊。我用UpdateData(),可是每次都是一行,存不下以前的。
各位大哥大姐帮帮忙啊,明天就要拿给别人了,急死我了。在线等好心人。
UpdateData(FALSE);
2. void ScrollLine(CString strLineText)
{
CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
int nLen = pEdit->GetWindowTextLength ();
pEdit->SetFocus();
pEdit->SetSel(nLen, nLen);
strLineText += "\r\n";
pEdit->ReplaceSel(strLineText);
}
{
static long = 0;
CString str;
long++;
str.Format("the %ld time");
ScrollLine(str);
}