Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Keyboard input on a HwndSource-hosted TextBox

$
0
0
I'm using HwndSource to host WPF controls in a Win32 (MFC) window. The Win32 project is actually native and I use a mixed-mode MFC Extension DLL in the middle to wrap the HwndSource. One of the WPF controls is a TextBox. I can delete characters from the TextBox by using the Backspace and Delete keys, or Paste text to the TextBox via the context menu, but I can't write text to it. I've been under the impression that HwndSource wraps keyboard message dispatching between the native side and the WPF side. Do I need some additional code to be able to write to the TextBox? And if so, why do Backspace and Delete work?

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>