void CRrrrView::OnButton1()
{
// TODO: Add your control notification handler code here
CString str;
CMainFrame* pFram = (CMainFrame*)this->GetParent() ;
// 任何指针使用前都要判断
if ( pFram == NULL )
{
MessageBox("pFrame == NULL ") ;
return ;
}
CEdit *pED = (CEdit *)(pFram->GetDlgBar()->GetDlgItem(IDC_EDIT1));
if ( pED == NULL )
{
MessageBox( "pED == NULL " ) ;
return ;
}
pED->GetWindowText(str);
if ( str == "" )
{
MessageBox( "pED == NULL " ) ;
return ;
}
Navigate2(_T(str),NULL,NULL);
}
//在view里获取dialog中的edit的指针