|
想用receive按钮控制是否接收数据,怎样调整它和ReadPortThread间的关系??
[复制链接]
void CMySerialFourDlg::OnReceive()
{
// TODO: Add your control notification handler code here
::MessageBox(NULL,_T("Datas will be received!"),_T("Notice!"),MB_ICONEXCLAMATION);
}
DWORD WINAPI ReadPortThread(LPVOID lpvoid)
{
WaitCommEvent (hPort, &dwCommModemStatus, 0);
SetCommMask (hPort, EV_RXCHAR); if (dwCommModemStatus & EV_RXCHAR)
{.......
}
想在点击Receive按钮后就执行ReadPortThread()判断dwCommModemStatus值,但是二者怎样协调?都是全局函数啊。先谢过了
|
|