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

📄 officeview.cpp

📁 企业办公管理系统
💻 CPP
字号:
// officeView.cpp : implementation of the COfficeView class
//

#include "stdafx.h"
#include "office.h"

#include "officeDoc.h"
#include "officeView.h"

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

/////////////////////////////////////////////////////////////////////////////
// COfficeView

IMPLEMENT_DYNCREATE(COfficeView, CFormView)

BEGIN_MESSAGE_MAP(COfficeView, CFormView)
	//{{AFX_MSG_MAP(COfficeView)
	ON_BN_CLICKED(IDC_TRANSACTION, OnTransaction)
	ON_BN_CLICKED(IDC_LETTER, OnLetter)
	ON_BN_CLICKED(IDC_PROPERTY, OnProperty)
	ON_BN_CLICKED(IDC_TRANREQUERY, OnTranrequery)
	ON_BN_CLICKED(IDC_STAFF, OnStaff)
	ON_BN_CLICKED(IDC_STAFF1, OnStaff1)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COfficeView construction/destruction

COfficeView::COfficeView()
	: CFormView(COfficeView::IDD)
{
	//{{AFX_DATA_INIT(COfficeView)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// TODO: add construction code here

}

COfficeView::~COfficeView()
{
}

void COfficeView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COfficeView)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BOOL COfficeView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs
    //this->SetWindowPos(0,50,50,500,500,120);
	return CFormView::PreCreateWindow(cs);
}

void COfficeView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();

}

/////////////////////////////////////////////////////////////////////////////
// COfficeView printing

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

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

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

void COfficeView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
	// TODO: add customized printing code here
}

/////////////////////////////////////////////////////////////////////////////
// COfficeView diagnostics

#ifdef _DEBUG
void COfficeView::AssertValid() const
{
	CFormView::AssertValid();
}

void COfficeView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// COfficeView message handlers
#include "transactionrecord.h"
void COfficeView::OnTransaction() 
{
	// TODO: Add your control notification handler code here
	CTransactionRecord transaction;
	if(IDOK==transaction.DoModal())
	{
	}
}
#include "letterrecord.h"
void COfficeView::OnLetter() 
{
	// TODO: Add your control notification handler code here
	CLetterRecord letter;
	if(IDOK==letter.DoModal())
	{
	}
}
#include "propertyrecord.h"
void COfficeView::OnProperty() 
{
	// TODO: Add your control notification handler code here
	CPropertyRecord property;
	if(IDOK==property.DoModal())
	{

	}
}

void COfficeView::OnDraw(CDC* pDC) 
{
	// TODO: Add your specialized code here and/or call the base class
/*	SetWindowPos(0,0,23,1200,1200,120);
	CBitmap bitmap;
	bitmap.LoadBitmap(IDB_BITMAP1);
	CDC compatibleDC;

    BITMAP bmp;
	bitmap.GetBitmap(&bmp);

	compatibleDC.CreateCompatibleDC(pDC);
    compatibleDC.SelectObject(&bitmap);

    CRect rect;
	GetClientRect(&rect);
	pDC->StretchBlt(0,0,rect.Width()-400,rect.Height()-400,
		         &compatibleDC,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
*/
//	pDC->BitBlt(200,0,800,800,&compatibleDC,0,0,SRCCOPY);
	
}
#include "searchtansaction.h"
void COfficeView::OnTranrequery() 
{
	// TODO: Add your control notification handler code here
	CSearchTansaction transaction;
	transaction.DoModal();
}
#include "staffbaseinfo.h"
void COfficeView::OnStaff() 
{
	// TODO: Add your control notification handler code here
	CStaffBaseInfo staffinfo;
	staffinfo.DoModal();
}
#include "searchemployeeinfo.h"
void COfficeView::OnStaff1() 
{
	// TODO: Add your control notification handler code here
	CSearchEmployeeInfo  searchemployeeInfo;
	searchemployeeInfo.DoModal();
}

⌨️ 快捷键说明

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