DNAView.cpp
资源名称:DNA4.rar [点击查看]
上传用户:kanghaisi
上传日期:2017-04-20
资源大小:5727k
文件大小:3k
源码类别:
DNA
开发平台:
Visual C++
- // DNAView.cpp : implementation of the CDNAView class
- //
- #include "stdafx.h"
- #include "DNA.h"
- #include "DNADoc.h"
- #include "DNAView.h"
- #include "ExplainDlg.h"
- #include "ShowDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDNAView
- IMPLEMENT_DYNCREATE(CDNAView, CView)
- BEGIN_MESSAGE_MAP(CDNAView, CView)
- //{{AFX_MSG_MAP(CDNAView)
- ON_COMMAND(IDM_Explain, OnExplain)
- ON_COMMAND(IDM_Show, OnShow)
- //}}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()
- /////////////////////////////////////////////////////////////////////////////
- // CDNAView construction/destruction
- CDNAView::CDNAView()
- {
- // TODO: add construction code here
- }
- CDNAView::~CDNAView()
- {
- }
- BOOL CDNAView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CDNAView drawing
- void CDNAView::OnDraw(CDC* pDC)
- {
- CDNADoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CDNAView printing
- BOOL CDNAView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CDNAView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CDNAView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CDNAView diagnostics
- #ifdef _DEBUG
- void CDNAView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CDNAView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CDNADoc* CDNAView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDNADoc)));
- return (CDNADoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CDNAView message handlers
- void CDNAView::OnExplain()
- {
- // TODO: Add your command handler code here
- CExplainDlg dlg;
- dlg.DoModal();
- }
- void CDNAView::OnShow()
- {
- // TODO: Add your command handler code here
- CShowDlg dlg;
- dlg.DoModal();
- }