Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Extended Debug macros

, 13 Jun 2001
A set of debug macros for checking expressions that work in
// WaveTestView.cpp : implementation of the CWaveTestView class
//

#include "stdafx.h"
#include "WaveTest.h"

#include "WaveTestDoc.h"
#include "WaveTestView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#define __LJS__DEBUG__YES__
#include "LJSDebug.h"
 
/////////////////////////////////////////////////////////////////////////////
// CWaveTestView

IMPLEMENT_DYNCREATE(CWaveTestView, CView)

BEGIN_MESSAGE_MAP(CWaveTestView, CView)
	//{{AFX_MSG_MAP(CWaveTestView)
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWaveTestView construction/destruction

CWaveTestView::CWaveTestView()
{
	// TODO: add construction code here

}

CWaveTestView::~CWaveTestView()
{
}

BOOL CWaveTestView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CWaveTestView drawing

void CWaveTestView::OnDraw(CDC* pDC)
{
	CWaveTestDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	pDC->SetPixel(0,0,0);
}

/////////////////////////////////////////////////////////////////////////////
// CWaveTestView diagnostics

#ifdef _DEBUG
void CWaveTestView::AssertValid() const
{
	CView::AssertValid();
}

void CWaveTestView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CWaveTestDoc* CWaveTestView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWaveTestDoc)));
	return (CWaveTestDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CWaveTestView message handlers

void CWaveTestView::OnLButtonDown(UINT nFlags, CPoint point) 
{

	VoidFunction();

	EXITCHECKVOIDFUNC( BoolFunction(), "Error");
	

 	CView::OnLButtonDown(nFlags, point);
}

void CWaveTestView::VoidFunction()
{
	CHECKVOIDEXPR( 2 == 5, " Error!! Different Value");



}
BOOL CWaveTestView::BoolFunction()
{
	CHECKEXPR( 2 == 4, " Different Value!! Error", false);
	return false;
}

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jungsul Lee

United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150327.1 | Last Updated 14 Jun 2001
Article Copyright 2001 by Jungsul Lee
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid