datamangerdoc.cpp

来自「我上传的程序为:群发数据管理软件的数据处理.软件可以自己从界面操作,把自己要导入」· C++ 代码 · 共 118 行

CPP
118
字号
// DataMangerDoc.cpp : implementation of the CDataMangerDoc class
//

#include "stdafx.h"
#include "DataManger.h"

#include "DataMangerDoc.h"
#include "DataMangerView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDataMangerDoc

int bNeed=1;

IMPLEMENT_DYNCREATE(CDataMangerDoc, CDocument)

BEGIN_MESSAGE_MAP(CDataMangerDoc, CDocument)
	//{{AFX_MSG_MAP(CDataMangerDoc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CDataMangerDoc construction/destruction

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

}

CDataMangerDoc::~CDataMangerDoc()
{
}

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

	((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)
	//0.
	
ShowMsg("========> 模拟业务导入产品程序主控显示 <========", bNeed);
	
	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CDataMangerDoc serialization

void CDataMangerDoc::Serialize(CArchive& ar)
{
	// CEditView contains an edit control which handles all serialization
	((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CDataMangerDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CDataMangerDoc commands

void CDataMangerDoc::ShowMsg(char *lpszMessage, UINT bNeedShow)
{
	for(POSITION pos=GetFirstViewPosition();pos!=NULL;)
	{
		CView* pView = GetNextView(pos);
		CDataMangerView* pQSClientView = DYNAMIC_DOWNCAST(CDataMangerView, pView);		
		if (pQSClientView != NULL)
		{
 			pQSClientView->ShowMsg(lpszMessage,bNeedShow);
		}
	}
	return;
}

BOOL CDataMangerDoc::SaveModified() 
{
	// TODO: Add your specialized code here and/or call the base class
	SetModifiedFlag(FALSE);
	return CDocument::SaveModified();
}

void CDataMangerDoc::DeleteContents() 
{
	// TODO: Add your specialized code here and/or call the base class
	if (!m_viewList.IsEmpty())
	{
		((CEditView*)m_viewList.GetHead())->SetWindowText(_T(""));	
	}
	CDocument::DeleteContents();
}

⌨️ 快捷键说明

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