同上,如使用全局变量要注意多线程同时访问,
一般都用消息::SendMessage(hWnd, msg, wparam, lparam);
如要发送一段字符串:
char str[] = "good";
::SendMessage(AfxGetApp()->m_pMainWnd->m_hWnd, WM_OK, (UINT)str, 0);