0510210204watchdoc.cpp

来自「数码管、模拟表、数字表、闹铃、秒表计时、倒计时、动画图标、闪烁窗口等功能」· C++ 代码 · 共 94 行

CPP
94
字号
// 0510210204watchDoc.cpp : implementation of the CMy0510210204watchDoc class
//

#include "stdafx.h"
#include "0510210204watch.h"
#include "0510210204watchDoc.h"
#include "0510210204watchView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMy0510210204watchDoc

IMPLEMENT_DYNCREATE(CMy0510210204watchDoc, CDocument)

BEGIN_MESSAGE_MAP(CMy0510210204watchDoc, CDocument)
	//{{AFX_MSG_MAP(CMy0510210204watchDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMy0510210204watchDoc construction/destruction

CMy0510210204watchDoc::CMy0510210204watchDoc()
{
	// TODO: add one-time construction code here

}

CMy0510210204watchDoc::~CMy0510210204watchDoc()
{
}

BOOL CMy0510210204watchDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CMy0510210204watchDoc serialization

void CMy0510210204watchDoc::Serialize(CArchive& ar)
{
	POSITION pos=GetFirstViewPosition();
	CMy0510210204watchView *pView=(CMy0510210204watchView*)GetNextView(pos);
	if (ar.IsStoring())
	{
		// TODO: add storing code here
       ar<<pView->mode<<pView->m_jishi_mode<<pView->m_jishi_ho<<pView->m_jishi_mo<<pView->m_jishi_so<<pView->m_jishi_tenso
		 <<pView->m_daoji_mode<<pView->m_daoji_ho<<pView->m_daoji_mo<<pView->m_daoji_so<<pView->m_daoji_tenso
		 <<pView->m_alarm_mode<<pView->m_alarmh<<pView->m_alarmm;
	}
	else
	{
		// TODO: add loading code here
		pView->KillTimer(3);
		ar>>pView->mode>>pView->m_jishi_mode>>pView->m_jishi_ho>>pView->m_jishi_mo>>pView->m_jishi_so>>pView->m_jishi_tenso
		>>pView->m_daoji_mode>>pView->m_daoji_ho>>pView->m_daoji_mo>>pView->m_daoji_so>>pView->m_daoji_tenso
		>>pView->m_alarm_mode>>pView->m_alarmh>>pView->m_alarmm;
		pView->SetTimer(3,10,NULL);
	}
}

/////////////////////////////////////////////////////////////////////////////
// CMy0510210204watchDoc diagnostics

#ifdef _DEBUG
void CMy0510210204watchDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CMy0510210204watchDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMy0510210204watchDoc commands

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?