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

📄 limittimesview.cpp

📁 Visual.C++程序设计技巧与实例--配套光盘 第6章 文件和系统操作 本章共11个实例: 1. FolderCopy文件夹的选择和拷贝 2. DeleteCertainFile删除指定路
💻 CPP
字号:
// LimitTimesView.cpp : implementation of the CLimitTimesView class
//

#include "stdafx.h"
#include "LimitTimes.h"

#include "LimitTimesDoc.h"
#include "LimitTimesView.h"
#include "MainFrm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CLimitTimesView

IMPLEMENT_DYNCREATE(CLimitTimesView, CView)

BEGIN_MESSAGE_MAP(CLimitTimesView, CView)
	//{{AFX_MSG_MAP(CLimitTimesView)
	ON_WM_LBUTTONDOWN()
	ON_COMMAND(dfdfdfdff, Ondfdfdfdff)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
	// Standard printing commands
	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()

/////////////////////////////////////////////////////////////////////////////
// CLimitTimesView construction/destruction

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

}

CLimitTimesView::~CLimitTimesView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CLimitTimesView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CLimitTimesView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CLimitTimesView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CLimitTimesView message handlers

void CLimitTimesView::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	//(CMainFrame *)AfxGetMainWnd()->SendMessage(WM_CLOSE);
	CView::OnLButtonDown(nFlags, point);
	//AfxGetMainWnd()->SendMessage(WM_CLOSE);
	//AfxGetApp()->m_pMainWnd->DestroyWindow();
}

void CLimitTimesView::Ondfdfdfdff() 
{
	(CMainFrame *)AfxGetMainWnd()->SendMessage(WM_CLOSE);	
}

int CLimitTimesView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	

	// TODO: Add your specialized creation code here
	
	return 0;
}

BOOL CLimitTimesView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
	//(CMainFrame *)AfxGetMainWnd()->SendMessage(WM_CLOSE);
}

⌨️ 快捷键说明

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