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

📄 vc05bview.cpp

📁 Visual C++ 6.0编程基础与范例
💻 CPP
字号:
// vc05bView.cpp : implementation of the CVc05bView class
//

#include "stdafx.h"
#include "vc05b.h"

#include "vc05bDoc.h"
#include "vc05bView.h"
#include "vc05bDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CVc05bView

IMPLEMENT_DYNCREATE(CVc05bView, CView)

BEGIN_MESSAGE_MAP(CVc05bView, CView)
	//{{AFX_MSG_MAP(CVc05bView)
	ON_COMMAND(ID_MENUITEM32771, OnMenuitem32771)
	ON_COMMAND(ID_MENUITEM32772, OnMenuitem32772)
	ON_COMMAND(ID_MENUITEM32773, OnMenuitem32773)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_MESSAGE(IDEND,OnEnd)
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CVc05bView construction/destruction

CVc05bView::CVc05bView()
{
	// TODO: add construction code here
	m_pd=new CVc05bDialog(this);
}

CVc05bView::~CVc05bView()
{
	delete m_pd;
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CVc05bView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CVc05bView printing

BOOL CVc05bView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CVc05bView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CVc05bView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CVc05bView diagnostics

#ifdef _DEBUG
void CVc05bView::AssertValid() const
{
	CView::AssertValid();
}

void CVc05bView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CVc05bView message handlers

void CVc05bView::OnMenuitem32771() 
{
	// TODO: Add your command handler code here
	if(m_pd->GetSafeHwnd() == 0)
	{
		m_pd->Creat();
	}
}

void CVc05bView::OnMenuitem32772() 
{
	// TODO: Add your command handler code here
	m_pd->DestroyWindow();
}

void CVc05bView::OnMenuitem32773() 
{
	// TODO: Add your command handler code here
	CVc05bDialog md;
	int a2=md.DoModal();
}

LONG CVc05bView::OnEnd()
{
	m_pd->DestroyWindow();
	return 0L;
}

⌨️ 快捷键说明

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