gpsnavview.cpp

来自「用vc++实现了开关串口」· C++ 代码 · 共 95 行

CPP
95
字号
// GpsNavView.cpp : implementation of the CMyGpsNavView class
//

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

#include "GpsNavDoc.h"
#include "GpsNavView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavView

IMPLEMENT_DYNCREATE(CMyGpsNavView, CScrollView)

BEGIN_MESSAGE_MAP(CMyGpsNavView, CScrollView)
	//{{AFX_MSG_MAP(CMyGpsNavView)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavView construction/destruction

CMyGpsNavView::CMyGpsNavView()
{
	// TODO: add construction code here

}

CMyGpsNavView::~CMyGpsNavView()
{
}

BOOL CMyGpsNavView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CScrollView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavView drawing

void CMyGpsNavView::OnDraw(CDC* pDC)
{
	CMyGpsNavDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

void CMyGpsNavView::OnInitialUpdate()
{
	CScrollView::OnInitialUpdate();

	CSize sizeTotal;
	// TODO: calculate the total size of this view
	sizeTotal.cx = sizeTotal.cy = 100;
	SetScrollSizes(MM_TEXT, sizeTotal);
}


/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavView diagnostics

#ifdef _DEBUG
void CMyGpsNavView::AssertValid() const
{
	CScrollView::AssertValid();
}

void CMyGpsNavView::Dump(CDumpContext& dc) const
{
	CScrollView::Dump(dc);
}

CMyGpsNavDoc* CMyGpsNavView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyGpsNavDoc)));
	return (CMyGpsNavDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMyGpsNavView message handlers

⌨️ 快捷键说明

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