?? gpsnavdoc.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 + -