Waiting for Messages in Managed Code
This is related to the previous question.
In a managed world:
- How can I check if the current thread has messages in the message queue?
- How do I yield to the OS and wait for a message on the current thread (like GetMessage or WaitMessage)?
I'm looking for non-PInvoke managed equivalents.
+1
source to share
2 answers
You can use the AddMessageFilter function .
I don't think there is a blocking way to do this without P / Invoke, as it is not .NET intent.
0
source to share