📄 multithreadview.cpp
字号:
// MultiThreadView.cpp : implementation of the CMultiThreadView class
//
#include "stdafx.h"
#include "MultiThread.h"
#include "MultiThreadDoc.h"
#include "MultiThreadView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMultiThreadView
IMPLEMENT_DYNCREATE(CMultiThreadView, CView)
BEGIN_MESSAGE_MAP(CMultiThreadView, CView)
//{{AFX_MSG_MAP(CMultiThreadView)
ON_COMMAND(ID_MT_TEST, OnMtTest)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CMultiThreadView construction/destruction
CMultiThreadView::CMultiThreadView()
{
// TODO: add construction code here
}
CMultiThreadView::~CMultiThreadView()
{
}
BOOL CMultiThreadView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CMultiThreadView drawing
void CMultiThreadView::OnDraw(CDC* pDC)
{
CMultiThreadDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CMultiThreadView printing
BOOL CMultiThreadView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CMultiThreadView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CMultiThreadView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CMultiThreadView diagnostics
#ifdef _DEBUG
void CMultiThreadView::AssertValid() const
{
CView::AssertValid();
}
void CMultiThreadView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CMultiThreadDoc* CMultiThreadView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMultiThreadDoc)));
return (CMultiThreadDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMultiThreadView message handlers
void CMultiThreadView::OnMtTest()
{
// TODO: Add your command handler code here
m_Dlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -