propView.cpp
资源名称:ictprop.rar [点击查看]
上传用户:tenhai
上传日期:2021-02-19
资源大小:492k
文件大小:3k
源码类别:
组合框控件
开发平台:
Visual C++
- // propView.cpp : implementation of the CPropView class
- //
- #include "stdafx.h"
- #include "prop.h"
- #include "propDoc.h"
- #include "CntrItem.h"
- #include "propView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPropView
- IMPLEMENT_DYNCREATE(CPropView, CRichEditView)
- BEGIN_MESSAGE_MAP(CPropView, CRichEditView)
- //{{AFX_MSG_MAP(CPropView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- ON_WM_DESTROY()
- //}}AFX_MSG_MAP
- // Standard printing commands
- ON_COMMAND(ID_FILE_PRINT, CRichEditView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_DIRECT, CRichEditView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRichEditView::OnFilePrintPreview)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPropView construction/destruction
- CPropView::CPropView()
- {
- // TODO: add construction code here
- }
- CPropView::~CPropView()
- {
- }
- BOOL CPropView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CRichEditView::PreCreateWindow(cs);
- }
- void CPropView::OnInitialUpdate()
- {
- CRichEditView::OnInitialUpdate();
- // Set the printing margins (720 twips = 1/2 inch).
- SetMargins(CRect(720, 720, 720, 720));
- }
- /////////////////////////////////////////////////////////////////////////////
- // CPropView printing
- BOOL CPropView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CPropView::OnDestroy()
- {
- // Deactivate the item on destruction; this is important
- // when a splitter view is being used.
- CRichEditView::OnDestroy();
- COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
- if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
- {
- pActiveItem->Deactivate();
- ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
- }
- }
- /////////////////////////////////////////////////////////////////////////////
- // CPropView diagnostics
- #ifdef _DEBUG
- void CPropView::AssertValid() const
- {
- CRichEditView::AssertValid();
- }
- void CPropView::Dump(CDumpContext& dc) const
- {
- CRichEditView::Dump(dc);
- }
- CPropDoc* CPropView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPropDoc)));
- return (CPropDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CPropView message handlers