![](/img/trans.png)
[英]NavigationWindow class: remove navigation bar and maximized NavigationWindow
[英]WPF System.Windows.Navigation.NavigationWindow in MFC application
我需要在MFC Win32应用程序中将WPF Lib与System.Windows.Navigation.NavigationWindow一起使用,但是我有黑屏而不是WPF Windows。 我在调试输出中没有错误消息。
我尝试过的所有其他WPF控件在MFC中都能正常工作(按钮,网格,带有C ++的D3D)。
任何人都有一个想法如何调试或如何调查?
谢谢
编辑:问题也发生与System.Windows::Window。 如果我在WPF应用程序中使用WPF,它就可以正常工作。
我找不到可行的解决方案,但是现在这是我的解决方法。
我使用WPF库创建了一个单独的WPF应用。
在我的MFC应用程序中,我这样做:
HWND wpfProcessMainWnd = CreateProcessWPF();
SetParent(wpfProcessMainWnd, hWnd);
DWORD style = GetWindowLong(wpfProcessMainWnd, GWL_STYLE);
style |= WS_CHILD;
style &= ~(WS_BORDER | WS_OVERLAPPEDWINDOW);
SetWindowLong(wpfProcessMainWnd, GWL_STYLE, style);
SetWindowPos(wpfProcessMainWnd, NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.