我有一个 MFC 应用程序,如果构建并运行,它会在打开后立即关闭。如果我调试应用程序,我会得到一个从 C:...\MFC\SRC\viewform.cpp 触发的 ASSERT。
ERROR: Dialog with IDD 0x008A must have the child style.
如果我继续调试程序,我会收到弹出错误Failed to create empty document
,输出终端列出以下内容:
Warning: couldn't create client pane for splitter.
Failed to create client pane/view for frame.
Warning: Window creation failed: GetLastError returns 0x00000000
Warning: failed to create CFrameWnd.
Warning: CDocTemplate couldn't create a frame.
The thread 0xFD8 has exited with code 0 (0x0).
这是我刚刚继承的一个代码项目,因此对代码不熟悉。我可以说应用程序的主对话框应该是一个显示四个窗口的拆分对话框。
但是,我对这些错误的含义感到困惑。任何人都可以帮忙吗?提前致谢。
调用堆栈显示错误的类被调用:
CFormView::Create(const char * 0x00000000, const char * 0x00000000, unsigned long 1342177280, const tagRECT & {top=0 bottom=10 left=0 right=10}, CWnd * 0x003d5198 {CSplitterWnd hWnd=0x0006058e}, unsigned int 59648, CCreateContext * 0x0012fa7c) line 69 + 25 bytes
CSplitterWnd::CreateView(int 0, int 0, CRuntimeClass * 0x0049d020 struct CRuntimeClass const CAgentsView::classCAgentsView, tagSIZE {...}, CCreateContext * 0x0012fa7c) line 311 + 48 bytes