Not only it is not in general case possible, but the question makes no sense at all. First of all, even Windows processes may not have any messages; as to Linux, there is no a single concept analogous to Windows "message". Generally, Linux has much smaller and much more distinct kernel then Windows "hybrid" kernel, and UI "messages" is not a part of the kernel.
(Compare:
http://en.wikipedia.org/wiki/Hybrid_kernel[
^],
http://en.wikipedia.org/wiki/Linux_kernel[
^],
http://en.wikipedia.org/wiki/Monolithic_kernel[
^].)
Moreover, the injection of the code into the message processing of another process is a kind of Windows-specific historical nonsense. Historically, Windows emerged as a shell over the DOS "OS", without any support of process isolation. Any process could freely and directly access memory of any other process. Different processes could communicate by sending messages to each other, same very messages designed to organize the even-oriented UI of the single process. Later on, isolated memory spaces for processes was introduces and supported by the protected mode and paging of i386 CPUs (NT, "New Technology"). However, for compatibility reasons, all messages, communications between processes via sending/posting messages and message handling (Windows Function) hooking survived and can actually be used in the newest versions of Windows. Nevertheless, all such techniques used as IPC lie far away from the general line of OS evolution; and I would strongly discourage the use of them. No wonder, Linux is pretty far from this situation.
—SA