1

I want to host Win32 window in WPF window to avoid flickering of DirectX content during window resizing.

Could someone say what is correct way to do this? And need I worry about DPI and something else? And how to apply hwndhost to WPF window after that?

Could someone help with it, please? I didn`t find any normal code sample for this use case.

Denis
  • 334
  • 4
  • 17

1 Answers1

1

This may be a bit late, but I think this StackOverflow answer will solve your problem: https://stackoverflow.com/a/17471534/1628916

In HwndHost.BuildWindowCore, create a window which includes the WS_CLIPCHILDREN style. This is called _hwndHost in the linked answer. Then, set your Win32 window as a child of the _hwndHost window.

Community
  • 1
  • 1
Chad Zawistowski
  • 1,876
  • 1
  • 13
  • 16