cantest1view.cpp
来自「使用vc编写的和can总线通讯」· C++ 代码 · 共 119 行
CPP
119 行
// CanTest1View.cpp : implementation of the CCanTest1View class
//
#include "stdafx.h"
#include "CanTest1.h"
#include "CanTest1Doc.h"
#include "CanTest1View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCanTest1View
IMPLEMENT_DYNCREATE(CCanTest1View, CFormView)
BEGIN_MESSAGE_MAP(CCanTest1View, CFormView)
//{{AFX_MSG_MAP(CCanTest1View)
// 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
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCanTest1View construction/destruction
CCanTest1View::CCanTest1View()
: CFormView(CCanTest1View::IDD)
{
//{{AFX_DATA_INIT(CCanTest1View)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CCanTest1View::~CCanTest1View()
{
}
void CCanTest1View::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCanTest1View)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CCanTest1View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
void CCanTest1View::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CCanTest1View printing
BOOL CCanTest1View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CCanTest1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CCanTest1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CCanTest1View::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/////////////////////////////////////////////////////////////////////////////
// CCanTest1View diagnostics
#ifdef _DEBUG
void CCanTest1View::AssertValid() const
{
CFormView::AssertValid();
}
void CCanTest1View::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CCanTest1Doc* CCanTest1View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCanTest1Doc)));
return (CCanTest1Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCanTest1View message handlers
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?