?? datasvrview.cpp
字號:
// DataSvrView.cpp : implementation of the CDataSvrView class
//
#include "stdafx.h"
#include "DataSvr.h"
#include "DataSvrDoc.h"
#include "DataSvrView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDataSvrView
IMPLEMENT_DYNCREATE(CDataSvrView, CView)
BEGIN_MESSAGE_MAP(CDataSvrView, CView)
//{{AFX_MSG_MAP(CDataSvrView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CDataSvrView construction/destruction
CDataSvrView::CDataSvrView()
{
// TODO: add construction code here
}
CDataSvrView::~CDataSvrView()
{
}
BOOL CDataSvrView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CDataSvrView drawing
void CDataSvrView::OnDraw(CDC* pDC)
{
CDataSvrDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
/*
CBrush oldbrush;
CDC m_pdcMemory;
CRect rect;
this->GetClientRect(&rect);
m_pdcMemory.CreateCompatibleDC(pDC);
// m_pBitmap->CreateCompatibleBitmappDC,rect.right+1,rect.bottom+1); pdcMemory->SelectObject(m_pBitmap);
oldbrush=m_pdcMemory.SelectObject(GRAY_BRUSH);
m_pdcMemory.Rectangle(0,0,rect.right,rect.bottom);
m_pdcMemory.SelectStockObject(NULL_BRUSH);
*/
}
/////////////////////////////////////////////////////////////////////////////
// CDataSvrView printing
BOOL CDataSvrView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CDataSvrView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CDataSvrView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CDataSvrView diagnostics
#ifdef _DEBUG
void CDataSvrView::AssertValid() const
{
CView::AssertValid();
}
void CDataSvrView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CDataSvrDoc* CDataSvrView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDataSvrDoc)));
return (CDataSvrDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CDataSvrView message handlers
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -