On 09/09/2013 09:24, Артём Титов wrote:So, what thread is it that handled the callback, and where is it afterwards? Is it waiting on a win32 synchronisation primitive in WaitFor, or is it actually processing Windows messages?
Thanks for response!
I know that, and I'm handling all messages inside "thread". It gets few messages, but when code exits callback method window stops to respond.
It sounds to me like it is not idling in a Windows message processing loop.
Personally, I would not recommend doing any windowing inside a network event processor thread. Put data into an internal queue and post a message to a window-handling thread when it goes to !empty.