You need to
SendMessage
/
PostMessage
Windows messages to the target
HWND
. You may also need a CBT hook depending on how you want to manipulate the behavior of the destination window.
See this article on this topic:
Manipulating Windows using messages and simple CBT hooking[
^]
(apparently lots of people are trying to do this nowadays, this question comes up very frequently).