ex myctrlsview.cpp

来自「学生系统输入对话框按钮及编辑框控件的使用」· C++ 代码 · 共 114 行

CPP
114
字号
// Ex MyCtrlsView.cpp : implementation of the CExMyCtrlsView class
//

#include "stdafx.h"
#include "Ex MyCtrls.h"

#include "Ex MyCtrlsDoc.h"
#include "Ex MyCtrlsView.h"
#include "StuInputDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CExMyCtrlsView

IMPLEMENT_DYNCREATE(CExMyCtrlsView, CView)

BEGIN_MESSAGE_MAP(CExMyCtrlsView, CView)
	//{{AFX_MSG_MAP(CExMyCtrlsView)
	ON_WM_LBUTTONDBLCLK()
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CExMyCtrlsView construction/destruction

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

}

CExMyCtrlsView::~CExMyCtrlsView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CExMyCtrlsView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CExMyCtrlsView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CExMyCtrlsView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CExMyCtrlsView message handlers

void CExMyCtrlsView::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CStuInputDlg m_dlg;
	m_dlg.DoModal();

	CView::OnLButtonDblClk(nFlags, point);
}

⌨️ 快捷键说明

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