【VC开源代码栏目提醒】:网学会员鉴于大家对VC开源代码十分关注,论文会员在此为大家搜集整理了“NetMapDoc.cpp”一文,供大家参考学习
// NetMapDoc.cpp : implementation of the CNetMapDoc class
//
#include "stdafx.h"
#include "NetMap.h"
#include "Input.h"
#include "NetMapDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNetMapDoc
IMPLEMENT_DYNCREATE(CNetMapDoc, CDocument)
BEGIN_MESSAGE_MAP(CNetMapDoc, CDocument)
//{{AFX_MSG_MAP(CNetMapDoc)
ON_COMMAND(ID_CONFIG, OnConfig)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNetMapDoc construction/destruction
CNetMapDoc::CNetMapDoc()
{
// TODO: add one-time construction code here
}
CNetMapDoc::~CNetMapDoc()
{
}
BOOL CNetMapDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CNetMapDoc serialization
void CNetMapDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CNetMapDoc diagnostics
#ifdef _DEBUG
void CNetMapDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CNetMapDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CNetMapDoc commands
void CNetMapDoc::OnConfig()
{
CInput input;
if(input.DoModal()==IDOK)
{
// CString str;
ip=input.m_ip;
community=input.m_community;
}
}