To dispatch messages of main thread in OnReceive(...) procedure of CAsyncSocket derived class
-
I have a client application which playbacks remote video files time-synchronous. I used CAsyncSocket derrived class for TCP/IP transaction. In order to display video frames time-synchronous I have to place "Sleep(...)" method in OnReceive(...) procedure. But "Sleep(...)" method blocks message processing of main thread in specified time-period, so the application is not responding the mouse and keyboard events or responding with 30-40 second delay. Because the socket generating messages heavily. So, I used PeekMessage(.....), TranslateMessage(...),DispatchMessage(...) in specified time-period instead of Sleep(...) method in order to proceed messages during waiting period. It is working correctly. I filtered a lot of message that may be dangerous to dispatch in OnReceive(...) procedure. Everything seems OK. The mouse and keyboard messages are being handled correctly. But I noticed a strange behaviour; there is a drop-down list box in the main window. Normally, the selected item of drop-down list box should change when mouse pointer comes over (without clicking). But it is not working. Selected item (blue printed item) does not change when mouse pointer comes over. I thing, It is dispatching all messages except some socket messages in OnReceive(...) procedure. What may cause this problem. Does anyone have an idea. Thanks. Erkan Ermis Erkan Ermis
-
I have a client application which playbacks remote video files time-synchronous. I used CAsyncSocket derrived class for TCP/IP transaction. In order to display video frames time-synchronous I have to place "Sleep(...)" method in OnReceive(...) procedure. But "Sleep(...)" method blocks message processing of main thread in specified time-period, so the application is not responding the mouse and keyboard events or responding with 30-40 second delay. Because the socket generating messages heavily. So, I used PeekMessage(.....), TranslateMessage(...),DispatchMessage(...) in specified time-period instead of Sleep(...) method in order to proceed messages during waiting period. It is working correctly. I filtered a lot of message that may be dangerous to dispatch in OnReceive(...) procedure. Everything seems OK. The mouse and keyboard messages are being handled correctly. But I noticed a strange behaviour; there is a drop-down list box in the main window. Normally, the selected item of drop-down list box should change when mouse pointer comes over (without clicking). But it is not working. Selected item (blue printed item) does not change when mouse pointer comes over. I thing, It is dispatching all messages except some socket messages in OnReceive(...) procedure. What may cause this problem. Does anyone have an idea. Thanks. Erkan Ermis Erkan Ermis
Selected item (blue printed item) does not change when mouse pointer comes over It maybe processed in IsDialogMessage()... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me
-
Selected item (blue printed item) does not change when mouse pointer comes over It maybe processed in IsDialogMessage()... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me
Dear 40 years old friend, I should effected you much enough. I am afraid you are going to fall in love with me. You can not measure neither my programming ability nor famous cafcassian dig. You are above 40 and still here. Tragic,,, It must be very stressfull. You should be unemployed or you are earning below 6000$ per month. Get relax proceed some far-east practices like yoga, meditation etc. It will work, trust me.
-
Dear 40 years old friend, I should effected you much enough. I am afraid you are going to fall in love with me. You can not measure neither my programming ability nor famous cafcassian dig. You are above 40 and still here. Tragic,,, It must be very stressfull. You should be unemployed or you are earning below 6000$ per month. Get relax proceed some far-east practices like yoga, meditation etc. It will work, trust me.
-
It was a great misunderstand, I noticed now. You should change your signature. Sorry for trouble and misunderstand. Thanks for your interest and response. And do not take care my former message. It is not my native language. So trouble comes from it.
And what is your f-ing problem? What 40 years have to do with your question and my answer? $6000/month? Idiot: +/-$6000 is usual for 5 minutes off my stock account fluctuations. Now: you get back to work -- sun is high enough... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me