Live Chat Icon For mobile
Live Chat Icon

How can I write Message Loops ?

Platform: WPF| Category: Message Loops Between

Message Loops can be written with the following properties.

IsThreadModal – returns whether the application has gone modal (e.g., a modal message loop has been pushed). ComponentDispatcher can track this state because the class maintains a count of ‘PushModal’ and ‘PopModal’ calls from the message loop.

ThreadFilterMessage and ThreadPreprocessMessage events follow the standard rules for delegate invocations. Delegates are invoked in an unspecified order and all delegates are invoked even if the first one marks the message as handled.

ThreadIdle – indicates an appropriate and efficient time to do idle processing (there are no other pending messages for the thread). ThreadIdle will not be raised if the thread is modal.

ThreadFilterMessage – raised for all messages that the message pump processes.

ThreadPreprocessMessage – raised for all messages that were not handled during ThreadFilterMessage.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.