1、Timer要读取并分发消息,才能触发自定义回调函数
SetTimer(NULL, 1, 40, (TIMERPROC)TimerProc);
while(GetMessage(&msg, NULL, 0, 0))
{
if (msg.message == WM_TIMER)
{
DispatchMessage(&msg);
}
}
void CALLBACK TimerProc()
2、串口错误CODE:998时,必须注意缓冲区,尽量开大点
1、Timer要读取并分发消息,才能触发自定义回调函数
SetTimer(NULL, 1, 40, (TIMERPROC)TimerProc);
while(GetMessage(&msg, NULL, 0, 0))
{
if (msg.message == WM_TIMER)
{
DispatchMessage(&msg);
}
}
void CALLBACK TimerProc()
2、串口错误CODE:998时,必须注意缓冲区,尽量开大点
转载于:https://www.cnblogs.com/rongfangliu/p/5252242.html