在我的任务中,我必须在 WPF 窗口中加载 MFC View 。当我运行代码时,出现错误显示:
调试断言在 appgui3.cpp 第 385 行失败:
BOOL CWinApp::EnableTaskbarInteraction(BOOL bEnable)
{
if(AfxGetMainWnd() != NULL)
{
ASSERT(FALSE);
**TRACE0("Windows 7 taskbar interacrion must be called before creation of main window.\n");**
return FALSE;
}
m_bTaskbarInteractionEnabled = bEnable;
return TRUE;
}
感谢您的帮助
最佳答案
您没有主窗口。在 WPF 窗口内创建 View 仍然需要框架窗口。 只要您有一个 EXE,您就需要一个主框架窗口来执行某些框架任务,例如任务栏交互。只要您没有大型机窗口,就没有任务栏可以与之交互的窗口。
关于c - 加载 MFC View 时,调试断言在\$InstallDir\VC\atlmfc\src\mfc\appgui3.cpp 第 385 行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26836023/