?? usingblobview.cpp
字號(hào):
// UsingBlobView.cpp : implementation of the CUsingBlobView class
//
#include "stdafx.h"
#include "UsingBlob.h"
#include "UsingBlobDoc.h"
#include "UsingBlobView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CUsingBlobView
IMPLEMENT_DYNCREATE(CUsingBlobView, CScrollView)
BEGIN_MESSAGE_MAP(CUsingBlobView, CScrollView)
//{{AFX_MSG_MAP(CUsingBlobView)
// 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
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CUsingBlobView construction/destruction
CUsingBlobView::CUsingBlobView()
{
// TODO: add construction code here
}
CUsingBlobView::~CUsingBlobView()
{
}
BOOL CUsingBlobView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CScrollView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CUsingBlobView drawing
void CUsingBlobView::OnDraw(CDC* pDC)
{
CUsingBlobDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CDC memDC;
memDC.CreateCompatibleDC(pDC);
CBitmap* pImage = memDC.SelectObject(&pDoc->m_Image);
CSize imageSize = pDoc->m_Image.GetBitmapDimension();
pDC->BitBlt(0,0,imageSize.cx,imageSize.cy,&memDC,0,0,SRCCOPY);
memDC.SelectObject(pImage);
}
void CUsingBlobView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
SetScrollSizes(MM_TEXT,GetDocument()->m_Image.GetBitmapDimension());
}
/////////////////////////////////////////////////////////////////////////////
// CUsingBlobView diagnostics
#ifdef _DEBUG
void CUsingBlobView::AssertValid() const
{
CScrollView::AssertValid();
}
void CUsingBlobView::Dump(CDumpContext& dc) const
{
CScrollView::Dump(dc);
}
CUsingBlobDoc* CUsingBlobView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CUsingBlobDoc)));
return (CUsingBlobDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CUsingBlobView message handlers
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -