What is the difference between sending messages and mailing and how are they related to programming in C #, WPF and Pure?

What is the difference between Send Message and Post Message (in terms of pure Windows programming) and how do they relate to C #, WPF, and Pure programming?

I am new to Threading and all related things, so please excuse me for the obvious quesiton. I need to dig out external threading threads. Please let me know the links that will help me build my concept from win32 programming into WPF.

I need to postpone the Post message to Afx (invoke to start a new thread) in order to delegate Invok / Begin Invoke to Dispatcher.

+54
c # winapi wpf
Jul 31 '10 at 3:10
source share
1 answer

PostMessage (in "pure window programming", aka win32 API) is asynchronous , that is, to quote documents:

Puts (puts) the message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.

To send a message to the message queue associated with the stream, use the PostThreadMessage function.

SendMessage synchronous , i.e. again quotes:

Sends the specified message to windows or windows. The SendMessage function calls the window procedure for the specified window and not until the window procedure has processed the message.

To send a message and return immediately, use SendMessageCallback or the SendNotifyMessage Function. To post a message to the thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.

A good tutorial on these two functions and their use here .

Connecting to WPF is discussed in this SO question .

+74
Jul 31 '10 at 3:18
source share



All Articles