Dialog中某一文本框的值,怎么在类外更新,而不出现"Debug Assertion Failed"

Dialog中某一文本框的值,如何在类外更新,而不出现"Debug Assertion Failed".
我所做的是一个网络连接的界面,它有一个Edit   Box。

新建了一个类外的线程,无参数,通过AfxGetMainWnd获取了这个对象(server),掉用:server-> Update(msg)

void   CServerDlg::Update(CString   msg)
{
UpdateData();
m_StrShow+=msg;
UpdateData(false);
}


------解决方案--------------------
类外线程代用其他窗口的UpdateData()肯定会出错的,
解决办法:使用SetWindowText()函数