a***@aol.com
2010-09-08 08:14:23 UTC
I think I'm asking a question about something I _should_ know <g>.
When a hardware or similar event occurs a message is sent to the
appropriate application. On receipt of such a message an event is
called and the code in the event handler is run.
Is the event, the message and the code in the event handler, run in
the application's thread or in the event's driver thread. Or does the
event's thread only post the message to the application's queue, and
the application's thread pulls it from the queue and process it when
it can.
How does one ensure that the next message received by the application
is processed only when the code in the event handler (and it's called
functions) are completed. And also process _all_ messages thar may be
posted.
In my application dropping the message (ie "lifting" the event handler
so that interim messages are ignored) is not an option, I must process
all messages received by the individual window (via it's separate
window handle). But I must handle messages only when the event
handler's code is completely finished.
Alan Lloyd
When a hardware or similar event occurs a message is sent to the
appropriate application. On receipt of such a message an event is
called and the code in the event handler is run.
Is the event, the message and the code in the event handler, run in
the application's thread or in the event's driver thread. Or does the
event's thread only post the message to the application's queue, and
the application's thread pulls it from the queue and process it when
it can.
How does one ensure that the next message received by the application
is processed only when the code in the event handler (and it's called
functions) are completed. And also process _all_ messages thar may be
posted.
In my application dropping the message (ie "lifting" the event handler
so that interim messages are ignored) is not an option, I must process
all messages received by the individual window (via it's separate
window handle). But I must handle messages only when the event
handler's code is completely finished.
Alan Lloyd