David Perkins wrote: > By custom message handler, do you mean use a message map and define a > new message type something like WM_USER+100?
Yes, you can also post the custom message to the hidden window that all ICS components own and override component's WndProc() to handle the new message, note that in ICS-V6 additional messages have to registered and unregistered by overriding AllocateMsgHandlers() and FreeMsgHandlers(). > > Does this happen only if messages are pumped whilst in the > OnDataAvailable event? Reentrance-problems may occur in any other event as well when messages are pumped in the event handler. > Would another thread calling processmessages > give the same problems? No, ProcessMessages retrieves messages from the thread message queue and dispatch them to the default window procedure. -- Arno Garrels > > Thanks. > > > > On 26/09/2007, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >> Hello David, >> >> Yes, a modal form is pumping messages. If it is really nececary to >> popup a form if you have received a certain packet, you have to >> create / show the form "outside" the OnDataAvailable event. >> >> To do it outside just post a message to a custom message handler. >> Your custom message handler will execute a while later (so outside >> the event) and you can safely display the modal form. If you need >> example, then just ask of course :) >> >> --- >> Rgds, Wilfried [TeamICS] >> http://www.overbyte.be/eng/overbyte/teamics.html >> http://www.mestdagh.biz >> >> Wednesday, September 26, 2007, 16:19, David Perkins wrote: >> >>> I now suspect that the data is only being sent once. >> >>> When I receive a certain packet I pop up a messagebox asking the >>> user a question and I suspect it is this that is causing the packet >>> to be repeated since it is ultimately being displayed by a call >>> from the OnDataAvailable event. >> >>> How may this be prevented? I cannot disable all messge processing >>> in my app whilst it's in the OnDataAvailable event. >> >> >>> On 26/09/2007, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >>>> Hello David, >>>> >>>> Eventually you can check with SocketSpy what exacly is sent. >>>> >>>> --- >>>> Rgds, Wilfried [TeamICS] >>>> http://www.overbyte.be/eng/overbyte/teamics.html >>>> http://www.mestdagh.biz >>>> >>>> -- >>>> To unsubscribe or change your settings for TWSocket mailing list >>>> please goto http://www.elists.org/mailman/listinfo/twsocket >>>> Visit our website at http://www.overbyte.be >>>> >> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://www.elists.org/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
