【VC开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VC开源代码-CMDDialogBarVIEW.cpp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
// CMDDialogBarView.cpp : implementation of the CCMDDialogBarView class
//
#include "stdafx.h"
#include "CMDDialogBar.h"
#include "CMDDialogBarDoc.h"
#include "CMDDialogBarView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCMDDialogBarView
IMPLEMENT_DYNCREATE(CCMDDialogBarView, CView)
BEGIN_MESSAGE_MAP(CCMDDialogBarView, CView)
//{{AFX_MSG_MAP(CCMDDialogBarView)
// 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
// 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()
/////////////////////////////////////////////////////////////////////////////
// CCMDDialogBarView construction/destruction
CCMDDialogBarView::CCMDDialogBarView()
{
// TODO: add construction code here
}
CCMDDialogBarView::~CCMDDialogBarView()
{
}
BOOL CCMDDialogBarView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CCMDDialogBarView drawing
void CCMDDialogBarView::OnDraw(CDC* pDC)
{
CCMDDialogBarDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->TextOut(30,30,"创建和使用对话条");
}
/////////////////////////////////////////////////////////////////////////////
// CCMDDialogBarView printing
BOOL CCMDDialogBarView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CCMDDialogBarView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CCMDDialogBarView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CCMDDialogBarView diagnostics
#ifdef _DEBUG
void CCMDDialogBarView::AssertValid() const
{
CView::AssertValid();
}
void CCMDDialogBarView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CCMDDialogBarDoc* CCMDDialogBarView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCMDDialogBarDoc)));
return (CCMDDialogBarDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCMDDialogBarView message handlers
上一篇:
CMDDialogBarDOC.cpp
下一篇:
第1章 现在完成时和现在完成进行时