|
// TraceView.cpp : implementation of the CTraceView class
//
#include "stdafx.h"
#include "Trace.h"
#include "TraceDoc.h"
#include "TraceView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTraceView
IMPLEMENT_DYNCREATE(CTraceView, CView)
BEGIN_MESSAGE_MAP(CTraceView, CView)
//{{AFX_MSG_MAP(CTraceView)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CTraceView construction/destruction
CTraceView::CTraceView()
{
// TODO: add construction code here
CTraceApp::m_LogTrace.WriteLine("CView Constructor");
}
CTraceView::~CTraceView()
{
}
BOOL CTraceView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
CTraceApp::m_LogTrace.WriteLine("CView::Precreate window");
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CTraceView drawing
void CTraceView::OnDraw(CDC* pDC)
{
CTraceDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CTraceView printing
BOOL CTraceView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CTraceView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CTraceView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CTraceView diagnostics
#ifdef _DEBUG
void CTraceView::AssertValid() const
{
CView::AssertValid();
}
void CTraceView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CTraceDoc* CTraceView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTraceDoc)));
return (CTraceDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTraceView message handlers
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Bob Pittenger is founder and President of Starpoint Software Inc. He holds a B.A. degree from Miami University, M.S. and Ph.D. degrees from Purdue University, and an MBA from Xavier University. He has been programming since 1993, starting with Windows application development in C++/MFC and moving to C# and .NET around 2005 and is a .NET Microsoft Certified Professional Developer.
Bob is the author of two books:
Billionaire: How the Ultra-Rich Built Their Fortunes Through Good and Evil and What You Can Learn from Them
and
Wealthonomics: The Most Important Economic and Financial Concepts that Can Make You Rich Fast.
Visit http://www.billionairebook.net for more information.