Message queues are per thread, so you cannot GetMessage for the other thread or process.
What you need is to install a window hook. See SetWindowsHookEx with WH_CALLWNDPROC hook type. Your dll will be loaded to all processes and intercept all window messages.
Then decide which messages/processes/windows you need to ignore and which to handle.