Re: Do_Events()

From: AlanGLLoyd (alanglloyd_at_aol.com)
Date: 08/15/04


Date: 15 Aug 2004 06:05:20 GMT

In article <q6qth09jl4g5d8i6vtl237ig8gtpq1t7lk@4ax.com>, not@any.adr writes:

>You need to write a secondary message dispatcher to be called periodically
>during the loops...
>
>Look in the WinApi guide for PeekMessage and GetQueueStatus... these can be
>used along with TranslateMessage and DispatchMessage to create a message
>dispatcher that checks the message queue and doesn't wait around for
>something
>to do...
>

That's the tech-whizzy way to go <g>, but Delphi's equivalent to Do_Events for
simple programmers is Application.ProcessMessages - and has similar,
occasionally-met gotchas hidden in it.

Alan Lloyd
alanglloyd@aol.com



Relevant Pages

  • Messages in Windows
    ... According to MSDN, "After removing a message from its queue, an application ... can use the DispatchMessage function to direct the system to send the ... The ProcessMessages() will do the following: ... Are the character messages translated by TranslateMessage() posted to the message queue of thread of ProcessMessages, ...
    (microsoft.public.vc.language)
  • Re: Messages in Windows
    ... > According to MSDN, "After removing a message from its queue, an application ... > can use the DispatchMessage function to direct the system to send the ... DispatchMessage passes the window handle, ... > Are the character messages translated by TranslateMessage() posted to the message queue of thread of ProcessMessages, ...
    (microsoft.public.vc.language)
  • Re: Bypass DispatchMessage
    ... If TranslateMessage is called, must ... DispatchMessage be called? ... from then composes WM_CHAR messages. ... passes them to the proper window procedure. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: CL implementation to process Windows messages
    ... similar to the idiomatic Win32 message pump loop? ... > GetMessage() ... > TranslateMessage() ... > DispatchMessage() ...
    (comp.lang.lisp)