/InputDlg.h
CString m_strBSName;
CEdit m_editBSName;
afx_msg void OnBnClickedOk();
//InputDlg.cpp
void CInputDlg::OnBnClickedOk(){
// TODO: 在此添加控件通知处理程序代码
GetDlgItemText(IDC_EDIT_BSNAME,m_strBSName);
CDialogEx::OnOK();
}
//.rc
//Dialog
//IDD_GETINPUT
//btn1:IDOK btn2:IDCANCEL EditControl:IDC_EDIT1
CInputDlg dlg;
if(IDOK==dlg.DoModal()){//确定
MessageBox(dlg.m_strBSName;);
}