MFC 应用程序在 AfxCheckDialogTemplate 上崩溃
MFC application crashes on AfxCheckDialogTemplate
我有一个MFC应用程序,如果构建并运行,打开后会立即关闭。如果我调试应用程序,那么我会从 C:...\MFC\SRC\viewform.cpp 触发一个断言。
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
ERROR: Dialog with IDD 0x008A must have the child style.
在 resource.h 中查找0x008A的对话框模板 ID。在资源视图中,打开该对话框模板进行编辑。右键单击对话框并选择属性。将样式设置为"子级"。
相关文章:
- 当回溯以零开始时,如何调试崩溃
- 内联映射初始化的动态atexit析构函数崩溃
- 执行函数时导致崩溃的变量
- 程序崩溃并显示"std::out_of_range"错误
- CoInitialize()在单独的线程上崩溃而不返回
- 使用调试/崩溃报告将应用程序部署到客户端
- 为什么所有C++编译器都会崩溃或挂起此代码
- 为什么lambda在clang上崩溃而不是在gcc上崩溃
- 为什么我的多线程作业队列崩溃
- ExtractIconEx:可以工作,但偶尔会崩溃
- 为什么引用传递会导致此崩溃(C++)
- 试图创建流或fopen时程序崩溃
- 类对象数组的问题会导致崩溃
- 排序时无法执行交换操作.我做的时候它会崩溃.为什么
- 为什么要增加导致崩溃的指针
- 在虚幻引擎中删除NXOpen对象时崩溃
- 为什么它只打印双链接列表的第一个值,而我的程序却崩溃了
- 应用程序崩溃并显示"symbol _ZdlPvm, version Qt_5 not defined in file libQt5Core.so.5 with link time reference"
- Visual Studio在尝试读取resource.txt文件时崩溃
- 将方法转换为调用该方法的成员函子对象会导致崩溃