CChildFrame* pMain = (CChildFrame *) AfxGetMainWnd();<<---错误应该在这里CEdit& theEditCtrl = ((CDocKingView *)pMain->m_wndSplitter.GetPane(0,1))->GetEditCtrl();
CChildFrame* pMain = (CChildFrame *) AfxGetMainWnd();<<---错误应该在这里CEdit& theEditCtrl = ((CDocKingView *)pMain->m_wndSplitter.GetPane(0,1))->GetEditCtrl();
而不是AfxGetMainWnd