Handling messages for window from other process
Posted
by MK
on Stack Overflow
See other posts from Stack Overflow
or by MK
Published on 2009-09-01T19:13:30Z
Indexed on
2010/04/01
17:03 UTC
Read the original article
Hit count: 461
I'm developing a C# WPF application that reparents the main window of another application using a call to Win32 SetParent(). The handle to this out-of-process child window is wrapped by a class named FormHost which is derived from HwndHost. All is working well except for one thing: messages for the reparented window are not delivered to FormHost. MSDN documentation clearly states that the HwndHost window procedure WndProc() cannot be used with out-of-process windows. The alternative, MessageHook doesn't work either. I also tried calling AttachThreadInput() to combine the input processing of the two windows. No luck. Any suggestions?
© Stack Overflow or respective owner