You cannot subclass a window that belongs to another process.

You could install a wh_getmessage hook which will get called whenever a message is removed from the message queue of the target application but, as far as I am aware, you cannot modify a message using such a hook.

Alternatively you can attach to the process using a debugger, set a breakpoint on th eapplication's message handler and work from there.

However, all of this is difficult at best.

HTH,
Duncan