【VC开源代码栏目提醒】:网学会员为需要VC开源代码的朋友们搜集整理了Ex04_1View.cpp相关资料,希望对各位网友有所帮助!
// Ex04_1View.cpp : implementation of the CEx04_1View class
//
#include "stdafx.h"
#include "Ex04_1.h"
#include "Ex04_1Doc.h"
#include "Ex04_1View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx04_1View
IMPLEMENT_DYNCREATE(CEx04_1View, CView)
BEGIN_MESSAGE_MAP(CEx04_1View, CView)
//{{AFX_MSG_MAP(CEx04_1View)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CEx04_1View construction/destruction
CEx04_1View::CEx04_1View()
{
// TODO: add construction code here
}
CEx04_1View::~CEx04_1View()
{
}
BOOL CEx04_1View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CEx04_1View drawing
void CEx04_1View::OnDraw(CDC* pDC)
{
CEx04_1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
pDC->TextOut(50,50,"Hello VC++! This is my first SDI program.");//在x=50,y=50的位置显示字符串
}
/////////////////////////////////////////////////////////////////////////////
// CEx04_1View printing
BOOL CEx04_1View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CEx04_1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CEx04_1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CEx04_1View diagnostics
#ifdef _DEBUG
void CEx04_1View::AssertValid() const
{
CView::AssertValid();
}
void CEx04_1View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CEx04_1Doc* CEx04_1View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEx04_1Doc)));
return (CEx04_1Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx04_1View message handlers
上一篇:
Ex04_1Doc.cpp
下一篇:
关于听觉掩蔽的语音增强算法及DSP实现