简单,不懂,求助......
目的:在视图类.cpp中,获得对话框工具条CDialogBar的Edit控件中的文本
代码:
CMainFrame *pw=(CMainFrame *)AfxGetMainWnd();
CControlBar *pb=pw->GetControlBar(IDD_MY_DIALOG);
pb->GetDlgItemText(IDC_EDIT,wwwadress);
//wwwadress是自定义的CString变量
问题:能编译,但执行时终止,跟踪编译,提示在GetDlgItemText中
ASSERT(::IsWindow(m_hwnd))
我估计是无法正确获得Edit控件指针
怎么办???? HELP......