We are developing a UI Control in WPF to be consumed within an existing Windows Forms / MFC application engine (Rhino 3D).
The application engine exposes the ability
I have a similar issue with a wxWidgets parent window and embedded WPF TextBox controls. I found that although attaching ChildHwndSourceHook does solve the problem of not receiving keyboard input, I ended up with occasional duplicate space characters. It seems the WM_KEYDOWN message handles the space characters reliably, but a duplicate WM_CHAR message is also received for some of the spaces. To solve this I added the following clause to the body of the ChildHwndSourceHook function, which simply ignores the WM_CHAR space character:
const UInt32 WM_CHAR = 0x0102;
if (msg == WM_CHAR)
{
// avoid duplicated spaces when parent window is a native window
if (wParam.ToInt32() == 32)
handled = true;
}