📄 sjwfview.cpp
字号:
// SJWFView.cpp : implementation of the CSJWFView class
//
#include "stdafx.h"
#include "SJWF.h"
#include "SJWFSet.h"
#include "SJWFDoc.h"
#include "SJWFView.h"
#include "ScoolWriteDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSJWFView
IMPLEMENT_DYNCREATE(CSJWFView, CRecordView)
BEGIN_MESSAGE_MAP(CSJWFView, CRecordView)
//{{AFX_MSG_MAP(CSJWFView)
ON_BN_CLICKED(IDC_RECORDWRITE, OnRecordwrite)
ON_BN_CLICKED(IDC_EXIT, OnExit)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CSJWFView construction/destruction
CSJWFView::CSJWFView()
: CRecordView(CSJWFView::IDD)
{
//{{AFX_DATA_INIT(CSJWFView)
// NOTE: the ClassWizard will add member initialization here
m_pSet = NULL;
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CSJWFView::~CSJWFView()
{
}
void CSJWFView::DoDataExchange(CDataExchange* pDX)
{
CRecordView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSJWFView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CSJWFView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CRecordView::PreCreateWindow(cs);
}
void CSJWFView::OnInitialUpdate()
{
m_pSet = &GetDocument()->m_sJWFSet;
CRecordView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CSJWFView printing
BOOL CSJWFView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSJWFView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSJWFView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSJWFView diagnostics
#ifdef _DEBUG
void CSJWFView::AssertValid() const
{
CRecordView::AssertValid();
}
void CSJWFView::Dump(CDumpContext& dc) const
{
CRecordView::Dump(dc);
}
CSJWFDoc* CSJWFView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSJWFDoc)));
return (CSJWFDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSJWFView database support
CRecordset* CSJWFView::OnGetRecordset()
{
return m_pSet;
}
/////////////////////////////////////////////////////////////////////////////
// CSJWFView message handlers
void CSJWFView::OnRecordwrite()
{
CScoolWriteDlg dlg;
dlg.DoModal();
}
void CSJWFView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
{
// TODO: Add your specialized code here and/or call the base class
CRecordView::OnPrint(pDC, pInfo);
}
//DEL void CSJWFView::OnDraw(CDC* pDC)
//DEL {
//DEL // TODO: Add your specialized code here and/or call the base class
//DEL CSJWFDoc* pDoc = GetDocument();
//DEL ASSERT_VALID(pDoc);
//DEL }
void CSJWFView::OnExit()
{
CWnd *hWnd;
// CScoolWriteDlg dlg;
// hWnd=dlg.GetParent();
hWnd=this->GetParent();
hWnd->DestroyWindow();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -