I have dialog that contains Text Edit control binded to CEdit m_edit member variable. After show modal I need to get content of Text Edit.
BOOL CPreparationApp::InitInstance()
{
MyDlg Dlg;
m_pMainWnd = &Dlg;
Dlg.DoModal();
CString strLine;
Dlg.m_edit.GetWindowTextW(strLine); // Debug assertion message
}
Durring Dlg.m_edit.GetWindowTextW(strLine); I have exception:
---------------------------
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
---------------------------
What this exception means? How to copy string from m_edit?