⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gpsnavdoc.cpp

📁 用vc++实现了开关串口
💻 CPP
字号:
// GpsNavDoc.cpp : implementation of the CMyGpsNavDoc class
//

#include "stdafx.h"
#include "GpsNav.h"

#include "GpsNavDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavDoc

IMPLEMENT_DYNCREATE(CMyGpsNavDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavDoc construction/destruction

CMyGpsNavDoc::CMyGpsNavDoc()
{
	// TODO: add one-time construction code here
	pt=CPoint(-10,-10);
	m_nPenWidth=3;
	m_pStrokeCur = NewStroke();	
	//m_pStrokeCur->m_pointArray.Add(CPoint (0,0));
	//m_pStrokeCur->m_pointArray.Add(CPoint (200,200));

}

CMyGpsNavDoc::~CMyGpsNavDoc()
{
}

BOOL CMyGpsNavDoc::OnNewDocument()
{
	SetTitle( "GPS 导航" );
	if (!CDocument::OnNewDocument())
		return FALSE;

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavDoc serialization

void CMyGpsNavDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavDoc commands

void CMyGpsNavDoc::OnCloseDocument() 
{
	// TODO: Add your specialized code here and/or call the base class
	SetModifiedFlag( FALSE );
	CDocument::OnCloseDocument();
}


CStroke* CMyGpsNavDoc::NewStroke()
{
	CStroke* pStrokeItem = new CStroke(m_nPenWidth);
	m_strokeList.AddTail(pStrokeItem);
	SetModifiedFlag();  
	return pStrokeItem; 
}

⌨️ 快捷键说明

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