DLG对话框

来源:互联网 发布:java抛出运行时异常 编辑:程序博客网 时间:2024/06/13 05:31
/InputDlg.hCString m_strBSName;CEdit m_editBSName;afx_msg void OnBnClickedOk();//InputDlg.cppvoid 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;);}