A: 

Regarding the empty title - this is because the name of the HwndSource window doesn't have anything to do with the window title. The HwndSource window that the code creates above is a child of the window represented by InParentWindowHandle. It is this window whose text is used for the title bar. You should call SetWindowText() using that HWND in order to set the title of the window.

As for the typing issue, are you sure that you need to add a hook? I've only created small test apps with WPF/Win32 integration, but I don't recall having to do anything special to ensure that the WPF controls received all keyboard input.

Andy
I actually made some tests with a new empty project and it seems that the keyboard events are transmitted without the need of a hook. So it must come from elsewhere... maybe it comes from WxWidgets.And about the title, yes, I noticed that the HwndSource is attached as a child of the Hwnd window in my test project, whereas it creates a whole new window in the main one. So it seems that attaching a HwndSource automatically creates a window, in my case, and I have no idea why.Thanks for your reply
I think HwndSource always creates a new window - that's just how it works.
Andy
A: 

There is a known incompatibility in WPF interop within a native, modal dialogue.

Summarizing:

Due to implementation details, WM_CHAR messages are swallowed by a modal dialog's message pump in the IsDialogMessage() function before they get to your control. You can force yourself to retrieve these by handling WM_GETDLGCODE in your hook function and returning DLGC_WANTCHARS.

Greg D