How to wait on events in main event loop (eg. using MsgWaitForMultipleObjectsEx()) ?
Richard <dj_deipotent-/[email protected]> Thu, 09 Aug 2012 04:03:53 +0100
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
I want to be able to wait on events in the main event loop as well as
normal messages. I understand I can use MsgWaitForMultipleObjectsEx() as
shown in the second code fragment here:
http://weblogs.asp.net/kennykerr/archive/2007/12/12/parallel-programming-with-c-part-2-asynchronous-procedure-calls-and-window-messages.aspx
I need a way to call different methods if different events get set.
The reason for this is that I want to be able to set an event in a
thread and have my main UI thread process it.
Is there a clean way to do this with WTL or should I derive a new class
from CMessageLoop, override Run() and copy most of the implementation
adding my extra code to hanbdle events ?
Best Regards,
Richard B.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/