ON_MESSAGE(WM_UPDATE_STATIC, CLibTestDlg::OnUpdateStatic)
extern CLibTestApp theApp;
............
// pDlg->m_info+=strRecvd;
((CLibTestDlg*)(theApp.m_pMainWnd))->m_info+=strRecvd;//ok
::PostMessage(((CLibTestDlg*)(theApp.m_pMainWnd))->m_hWnd, WM_UPDATE_STATIC, 0, 0);//ok
............
LRESULT CLibTestDlg::OnUpdateStatic(WPARAM wParam, LPARAM lParam)
{
UpdateData(false);
GetDlgItem(IDC_EDIT_LONGITUDE)->SetWindowText(g_strLongitude); //获取发送内容输入 string 类型
((CEdit*)GetDlgItem(IDC_EDIT1))->LineScroll(
m_info.GetLength() / (((CEdit*)GetDlgItem(IDC_EDIT1))->LineLength()));
return 0;
}