📄 mfcvegaview.cpp
字号:
// MFCVegaView.cpp : implementation of the CMFCVegaView class
//
#include "stdafx.h"
#include "vg.h"
#include "MFCVegaDoc.h"
#include MFCVega"MFCVegaView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMFCVegaView
IMPLEMENT_DYNCREATE(CMFCVegaView, zsVegaView);
BEGIN_MESSAGE_MAP(CMFCVegaView, zsVegaView)
//{{AFX_MSG_MAP(CMFCVegaView)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMFCVegaView construction/destruction
CMFCVegaView::CMFCVegaView()
{
// TODO: add construction code here
}
CMFCVegaView::~CMFCVegaView()
{
}
BOOL CMFCVegaView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return zsVegaView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CMFCVegaView drawing
void CMFCVegaView::OnDraw(CDC* pDC)
{
CMFCVegaDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CMFCVegaView diagnostics
#ifdef _DEBUG
void CMFCVegaView::AssertValid() const
{
zsVegaView::AssertValid();
}
void CMFCVegaView::Dump(CDumpContext& dc) const
{
zsVegaView::Dump(dc);
}
CMFCVegaDoc* CMFCVegaView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMFCVegaDoc)));
return (CMFCVegaDoc*)m_pDocument;
}
#endif //_DEBUG
// Virtual
const char* CMFCVegaView::getAdfName( void )
{
CMFCVegaDoc* doc = (CMFCVegaDoc*)GetDocument();
const char* adfName = doc->GetPathName() ;
// If the filename was not given open "VegaWin.adf".
if ( strlen( adfName ) == 0 )
return "VegaWin.adf";
else
return adfName;
}
void CMFCVegaView::postDefine( void )
{
vgWindow* win = vgGetWin(0);
vgWinSize( win, 0, SizeOfWinX, 0, SizeOfWinY );
}
/////////////////////////////////////////////////////////////////////////////
// CMFCVegaView message handlers
void CMFCVegaView::OnInitialUpdate()
{
zsVegaView::OnInitialUpdate();
runVega();
}
void CMFCVegaView::OnSize(UINT nType, int cx, int cy)
{
SizeOfWinX = cx;
SizeOfWinY = cy;
zsVegaView::OnSize(nType, cx, cy);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -