How to set Win32 window as owner of WPF window?

梦想的初衷 提交于 2019-11-29 05:47:49

This article shows how to get the handles for both as well as how to make the WPF window become a transparent overlay for the win32 window.

http://blogs.microsoft.co.il/blogs/tamir/archive/2007/04/11/Transparent-WPF-control-over-unmanaged-window-handle.aspx

This article uses a WindowInteropHelper to accomplish similar functionality.

http://blogs.msdn.com/wpfsdk/archive/2007/04/03/centering-wpf-windows-with-wpf-and-non-wpf-owner-windows.aspx

MSDN page on WindowInteropHelper:

http://msdn.microsoft.com/en-us/library/system.windows.interop.windowinterophelper.aspx

Hope that helps, Ed

How about SetParent()? I know works when making a WPF window an MDI Child of a Windows Form.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!