【VC开源代码栏目提醒】:本文主要为网学会员提供Ex06_4Doc.cpp,希望对需要Ex06_4Doc.cpp网友有所帮助,学习一下!
// Ex06_4Doc.cpp : implementation of the CEx06_4Doc class
//
#include "stdafx.h"
#include "Ex06_4.h"
#include "Ex06_4Doc.h"
#include "StumsgDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx06_4Doc
IMPLEMENT_DYNCREATE(CEx06_4Doc, CDocument)
BEGIN_MESSAGE_MAP(CEx06_4Doc, CDocument)
//{{AFX_MSG_MAP(CEx06_4Doc)
ON_COMMAND(ID_RECODE_STUMSG, OnRecodeStumsg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEx06_4Doc construction/destruction
CEx06_4Doc::CEx06_4Doc()
{
// TODO: add one-time construction code here
m_bCProgram=0;
m_bsoftware=0;
}
CEx06_4Doc::~CEx06_4Doc()
{
}
BOOL CEx06_4Doc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_4Doc serialization
void CEx06_4Doc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
ar<<m_name;
ar<<m_number;
ar<<m_tel;
}
else
{
// TODO: add loading code here
ar>>m_name;
ar>>m_number;
ar>>m_tel;
}
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_4Doc diagnostics
#ifdef _DEBUG
void CEx06_4Doc::AssertValid() const
{
CDocument::AssertValid();
}
void CEx06_4Doc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx06_4Doc commands
void CEx06_4Doc::OnRecodeStumsg()
{
// TODO: Add your command handler code here
CStumsgDlg dlg;
if(dlg.DoModal()==IDOK)
{
m_name=dlg.m_name;
m_number=dlg.m_number;
m_tel=dlg.m_tel;
m_college=dlg.m_college;
m_banji=dlg.m_banji;
m_bCProgram=dlg.m_bCProgram;
m_bsoftware=dlg.m_bsoftware;
m_men=dlg.m_men;
}
UpdateAllViews(NULL);
}