Tobias Rapp wrote: > Arno Garrels wrote: > >> procedure TTestThread.Execute; >> var >> Msg: TMsg; >> begin >> // PeekMessage(Msg, 0, 0, 0, PM_NOREMOVE); // Initialize thread's >> message queue >> >> FHandle := Classes.AllocateHWnd(WndProc); // Create a hidden window >> [...] > > Can you give details why a call to PeekMessage() should be added > here?
Not necessarily, but it's good practice to initialize the queue as soon as possible in order not to miss any message. > Until now I never used this statement outside of a message loop > and did not run into problems so far... You are probably right, I just tested to PostMessage to a thread window where the thread does not call the message pump and PostMessage succeeded as well. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be