You can use SetWindowsHookEx to load a dll into the target process, from the dll you export a new window procedure where you can check for windows messages.
I'll see if I can find a code sample somewhere, if not I'll write one myself.
Added:
Here's one...
http://www.codeproject.com/system/Mi...ndowToTray.asp