Home > Back-end >  Added AfxMessage VC program is dead, can perform. For improvement program
Added AfxMessage VC program is dead, can perform. For improvement program

Time:09-21

DWORD WINAPI CMainFrame: : Fun (LPVOID lpParamter)
{

AfxMessageBox (" thread start ");
While (1)
{
Mm=Serial_Recv (handle111 recvbuff, sizeof (recvbuff));
AfxMessageBox (" thread starts again ");
If (mm!=0)
{
DLG CMainFrame *=(CMainFrame *) lpParamter;
CMainFrame: : panduan (mm, DLG);

}
}
Return 0 l;
}



Void CMainFrame: : panduan (int mm, CMainFrame * pp)
{

If (recvbuff [0]==0 x03)
{

Pp - & gt; OnCrossDissolve ();

AfxMessageBox (" receives the serial data, the pop-up dialog ");
}
Mm=0;
The delete pp;
//Sleep (5000);

}

Add AfxMessageBox (" receives the serial data, the pop-up dialog "); Pp - & gt; OnCrossDissolve (); To execute, the pop-up dialog box, and the bottom right hand corner to remove the program is dead, and improvement scheme,,, thank you, just to learn VC
  • Related