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

📄 readerandwriterview.cpp

📁 通过本程序能够实现os中经典的生产者消费者问题
💻 CPP
字号:
// ReaderAndWriterView.cpp : implementation of the CReaderAndWriterView class
//

#include "stdafx.h"
#include "ReaderAndWriter.h"

#include "ReaderAndWriterDoc.h"
#include "ReaderAndWriterView.h"
#include "WAndR.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif








/////////////////////////////////////////////////////////////////////////////
// CReaderAndWriterView



IMPLEMENT_DYNCREATE(CReaderAndWriterView, CView)

BEGIN_MESSAGE_MAP(CReaderAndWriterView, CView)
	//{{AFX_MSG_MAP(CReaderAndWriterView)
	ON_COMMAND(ID_WANDR, OnWandr)
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CReaderAndWriterView construction/destruction

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

}

CReaderAndWriterView::~CReaderAndWriterView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CReaderAndWriterView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CReaderAndWriterView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CReaderAndWriterView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CReaderAndWriterView message handlers

void CReaderAndWriterView::OnWandr() 
{
	// TODO: Add your command handler code here
	CWAndR WRDlg;
	WRDlg.DoModal();
}

⌨️ 快捷键说明

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