这是正在发生的事情。当我尝试从我的 CDialog 扩展类运行 AfxMessageBox 时,我得到一个错误(见下文)。我用谷歌搜索了互联网,但没有找到。这是消息框唯一失败的地方,我知道其余代码有效(我逐步完成了它)。
有谁知道如何解决这一问题?
提前致谢!
AFXMESSAGEBOX 打开时的错误消息:
IsoPro.exe 中 0x014b4b70 处的未处理异常:0xC0000005:访问冲突读取位置 0x34333345。
从 CDialog 中启动 AfxMessageBox 的代码
LPTSTR temp;
mainPassword.GetWindowText((LPTSTR)temp,100);
CString cstr;
cstr.Format("mainPassword = %s",temp);
AfxMessageBox(cstr);
显示 CDialog 的代码:
CEnterpriseManagementDialog* emd = new CEnterpriseManagementDialog();
emd->Create(IDD_ENTERPRISE_MANAGEMENT_DIALOG);
emd->ShowWindow(SW_SHOW);