View.cpp
上传用户:nhyuejuan
上传日期:2013-12-02
资源大小:171k
文件大小:2k
- /////////////////////////////////////////////////////////////////////////////
- // Project:PGRSBAR
- // Author:NorthTibet
- // Date:星期二, 十二月 31, 2002
- // Description:在状态栏例实现进程指示器控制。
- //
- /////////////////////////////////////////////////////////////////////////////
- // View.cpp : implementation of the CMyView class
- //
- #include "stdafx.h"
- #include "pgrsbar.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, CEditView)
- BEGIN_MESSAGE_MAP(CMyView, CEditView)
- //{{AFX_MSG_MAP(CMyView)
- // 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()
- /////////////////////////////////////////////////////////////////////////////
- // 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
- BOOL bPreCreated = CEditView::PreCreateWindow(cs);
- cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
- return bPreCreated;
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyView drawing
- void CMyView::OnDraw(CDC* pDC)
- {
- CMyDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyView diagnostics
- #ifdef _DEBUG
- void CMyView::AssertValid() const
- {
- CEditView::AssertValid();
- }
- void CMyView::Dump(CDumpContext& dc) const
- {
- CEditView::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