Holy cow, I wrote a book!
There are several variations on
the SendMessage function,
but some are special cases of others.
The simplest version is SendMessage itself,
which sends a message and waits indefinitely for the response.
The next level up is
which sends a message and waits for the response or until
a certain amount of time has elapsed.
SendMessage is just SendMessageTimeout with an INFINITE timeout.
Another version of SendMessage is
which is like SendMessage except that it doesn't wait for
the response. It returns immediately and ignores the result
produced by the receiving window.
The last SendMessage-style functions is
This sends a message and then returns immediately.
When the recipient finally returns a response, the callback
SendNotifyMessage is SendMessageCallback with a callback that does nothing.
That's how the four message-sending functions fit together.
If you use any of the above send-type functions to send a message
to a window that belongs to the sending thread, the call is made