【发布时间】:2014-04-03 05:39:10
【问题描述】:
我有一个对话框,其中包含绑定到 CEdit m_edit 成员变量的文本编辑控件。显示模式后,我需要获取文本编辑的内容。
BOOL CPreparationApp::InitInstance()
{
MyDlg Dlg;
m_pMainWnd = &Dlg;
Dlg.DoModal();
CString strLine;
Dlg.m_edit.GetWindowTextW(strLine); // Debug assertion message
}
在Dlg.m_edit.GetWindowTextW(strLine);期间我有例外:
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!
Program: C:\Windows\SYSTEM32\mfc110ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\wincore.cpp
Line: 1215
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
这个异常意味着什么?如何从 m_edit 复制字符串?
【问题讨论】:
标签: c++ visual-c++ mfc