图像拼接技术View.cpp
资源名称:txpj.rar [点击查看]
上传用户:pureled
上传日期:2013-05-27
资源大小:1078k
文件大小:3k
源码类别:
GDI/图象编程
开发平台:
Visual C++
- // 图像拼接技术View.cpp : implementation of the CMyView class
- //
- #include "stdafx.h"
- #include "图像拼接技术.h"
- #include "图像拼接技术Doc.h"
- #include "图像拼接技术View.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMyView
- IMPLEMENT_DYNCREATE(CMyView, CScrollView)
- BEGIN_MESSAGE_MAP(CMyView, CScrollView)
- //{{AFX_MSG_MAP(CMyView)
- //}}AFX_MSG_MAP
- // Standard printing commands
- ON_COMMAND(ID_FILE_PRINT, CScrollView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CMyView construction/destruction
- CMyView::CMyView()
- {
- // TODO: add construction code here
- }
- CMyView::~CMyView()
- {
- }
- BOOL CMyView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CScrollView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyView drawing
- void CMyView::OnDraw(CDC* pDC)
- {
- CMyDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- pDoc->ShowBitmap(pDC);
- pDoc->ShowOther(pDC);
- pDoc->ShowNew(pDC);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyView printing
- BOOL CMyView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CMyView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CMyView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyView diagnostics
- #ifdef _DEBUG
- void CMyView::AssertValid() const
- {
- CScrollView::AssertValid();
- }
- void CMyView::Dump(CDumpContext& dc) const
- {
- CScrollView::Dump(dc);
- }
- CMyDoc* CMyView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyDoc)));
- return (CMyDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CMyView message handlers
- void CMyView::OnInitialUpdate()
- {
- CScrollView::OnInitialUpdate();
- // TODO: Add your specialized code here and/or call the base class
- CSize sizeTotal;
- sizeTotal.cx=sizeTotal.cy=3000;
- SetScrollSizes(MM_TEXT,sizeTotal);
- GetParentFrame()->RecalcLayout();
- ResizeParentToFit();
- }