?? srhview.cpp
字號:
// srhView.cpp : implementation of the CSrhView class
//
#include "stdafx.h"
#include "srh.h"
#include "srhSet.h"
#include "srhDoc.h"
#include "srhView.h"
#include "Studentdlg.h"
#include "Teacherdlg.h"
#include "Lessondlg.h"
#include "Choosedlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSrhView
IMPLEMENT_DYNCREATE(CSrhView, CRecordView)
BEGIN_MESSAGE_MAP(CSrhView, CRecordView)
//{{AFX_MSG_MAP(CSrhView)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CRecordView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CRecordView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRecordView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSrhView construction/destruction
CSrhView::CSrhView()
: CRecordView(CSrhView::IDD)
{
//{{AFX_DATA_INIT(CSrhView)
// NOTE: the ClassWizard will add member initialization here
m_pSet = NULL;
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CSrhView::~CSrhView()
{
}
void CSrhView::DoDataExchange(CDataExchange* pDX)
{
CRecordView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSrhView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CSrhView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CRecordView::PreCreateWindow(cs);
}
void CSrhView::OnInitialUpdate()
{
m_pSet = &GetDocument()->m_srhSet;
CRecordView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CSrhView printing
BOOL CSrhView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSrhView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSrhView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSrhView diagnostics
#ifdef _DEBUG
void CSrhView::AssertValid() const
{
CRecordView::AssertValid();
}
void CSrhView::Dump(CDumpContext& dc) const
{
CRecordView::Dump(dc);
}
CSrhDoc* CSrhView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSrhDoc)));
return (CSrhDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSrhView database support
CRecordset* CSrhView::OnGetRecordset()
{
return m_pSet;
}
/////////////////////////////////////////////////////////////////////////////
// CSrhView message handlers
void CSrhView::OnButton1()
{
// TODO: Add your control notification handler code here
CStudentdlg dlg;
dlg.DoModal();
}
void CSrhView::OnButton2()
{
// TODO: Add your control notification handler code here
CTeacherdlg dlg;
dlg.DoModal();
}
void CSrhView::OnButton3()
{
// TODO: Add your control notification handler code here
CLessondlg dlg;
dlg.DoModal();
}
void CSrhView::OnButton4()
{
// TODO: Add your control notification handler code here
CChoosedlg dlg;
dlg.DoModal();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -