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

📄 processmanagerview.cpp

📁 这是软件工程的关于模拟进程调度的课程论文
💻 CPP
字号:
// ProcessManagerView.cpp : implementation of the CProcessManagerView class
//

#include "stdafx.h"
#include "ProcessManager.h"

#include "ProcessManagerDoc.h"
#include "ProcessManagerView.h"

#include "MainFrm.h"
#include "PCB.h"

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

/////////////////////////////////////////////////////////////////////////////
// CProcessManagerView

IMPLEMENT_DYNCREATE(CProcessManagerView, CView)

BEGIN_MESSAGE_MAP(CProcessManagerView, CView)
	//{{AFX_MSG_MAP(CProcessManagerView)
	ON_WM_TIMER()
	//}}AFX_MSG_MAP
	// Standard printing commands
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CProcessManagerView construction/destruction

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

}

CProcessManagerView::~CProcessManagerView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CProcessManagerView drawing

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

	//CRect rect;
	//this->GetClientRect(&rect);

	//rect.left += 5;
	//rect.top += 5;
	//rect.bottom -= 5;
	//rect.right -= 5;
	
	//pDC->DrawText(((CMainFrame*)::AfxGetMainWnd())->strTotalProc, &rect,DT_LEFT|DT_END_ELLIPSIS);
}


/////////////////////////////////////////////////////////////////////////////
// CProcessManagerView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CProcessManagerView message handlers


void CProcessManagerView::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	
	CView::OnTimer(nIDEvent);
}



void CProcessManagerView::PrintAllProc(CDC* pDC)
{
	CClientDC cdc(this);
	CRect rect;
	this->GetClientRect(&rect);

	rect.left += 5;
	rect.top += 5;
	rect.bottom -= 5;
	rect.right -= 5;
	
	cdc.DrawText(((CMainFrame*)::AfxGetMainWnd())->strTotalProc, &rect,DT_LEFT|DT_END_ELLIPSIS);
}

⌨️ 快捷键说明

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