Home > Software engineering >  MFC/VC on VIEW window real-time monitored after receiving character processing
MFC/VC on VIEW window real-time monitored after receiving character processing

Time:09-16

Currently have a project, in a VIEW window, have to wait, data processing, processing and speed and so on several state, window to real-time is ready to receive data from the front-end ports end, before not yet received the data window has always been a wait state, as soon as we receive the data, data needs to be automatically input into a combo control and perform processing, excuse me everybody, what thinking is to be used for design is better? Said simple point is that the window waiting for front-end ports data together, after receive automatically added to the COMBO, whether to use multithreading? In which position real-time monitoring is better? thank you

CodePudding user response:

If data volume is not big, timer in receiving can, of course, have to non-blocking asynchronous mode
Large amount of data, background threads, thread after receiving post message

CodePudding user response:

Thanks to reply, the data quantity is not big, can use timer, but the settimer should be put in what position? I put in onshowwindow can only be triggered once, thank you.

CodePudding user response:

reference 1st floor zgl7903 response:
, if the data is in the timer can, of course have to non-blocking asynchronous mode
Large amount of data, background threads, thread after receiving post message

Thanks to reply, the data quantity is not big, can use timer, but the settimer should be put in what position? I put in onshowwindow can only be triggered once, thank you.

CodePudding user response:

 

//CSDI1View message handler

Void CSDI1View: : the OnInitialUpdate ()
{
__super: : OnInitialUpdate ();

//TODO: add in this dedicated code and/or call the base class
The SetTimer (1, 1000, NULL);
}

Void CSDI1View: : OnTimer (UINT_PTR nIDEvent)
{
//TODO: add the message handler code and/or invoke the default
TRACE (_T (" OnTimer Event \ n "));

//here don't call the CView: : OnTimer
//__super: : OnTimer (nIDEvent);
}





CodePudding user response:

I put in onshowwindow can only be triggered once, of course!
Need is OnTimer (UINT_PTR nIDEvent) response!
  • Related