📄 mteatherdlg.cpp
字号:
// MTeatherDlg.cpp : implementation file
//
#include "stdafx.h"
#include "M_ESystem.h"
#include "MTeatherDlg.h"
#include "M_ESystemDoc.h"
#include "M_ESystemView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMTeatherDlg dialog
CMTeatherDlg::CMTeatherDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMTeatherDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMTeatherDlg)
m_M_teacher = _T("");
//}}AFX_DATA_INIT
}
void CMTeatherDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMTeatherDlg)
DDX_Text(pDX, IDC_EDIT1, m_M_teacher);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMTeatherDlg, CDialog)
//{{AFX_MSG_MAP(CMTeatherDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMTeatherDlg message handlers
void CMTeatherDlg::OnOK()
{
// TODO: Add extra validation here
static int nCount1=0;
CDialog::OnOK();
//UpdateData(TRUE);
CM_ESystemDoc* pDoc = (CM_ESystemDoc*)this->GetParentFrame()->GetActiveDocument();
CM_ESystemView* pView = (CM_ESystemView*)this->GetParentFrame()->GetActiveView();
if(m_M_teacher.IsEmpty())
{
MessageBox("您没有输入老师姓名");
}
else
{
UpdateData(TRUE);
pDoc->m_mTeacher[nCount1] = m_M_teacher;
nCount1++;
}
pDoc->count2=nCount1;
//MessageBox(pDoc->count2);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -