Click here to Skip to main content
15,896,154 members
Articles / Desktop Programming / ATL

Test Runner Application

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
2 Nov 2005 106.3K   1.7K   27  
A framework for performing unit tests.
// 
//                         MALLINCKRODT 
//         Copyright(c) 1999 All Rights Reserved 
// 
// Description:
// 	Implements the class cvCSrvrItem
// 
// $Log: 
//  1    CliniVision1.0         11/9/99 11:22:51 AM  Doug C. Eveland 
// $
// $Revision: 1$
// $Date: 11/9/99 11:22:51 AM$
// $Author: Doug C. Eveland$
// 

#include "stdafx.h"
#include "cvCTestApp.h"

#include "cvCTestDoc.h"
#include "cvCSrvrItem.h"

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


IMPLEMENT_DYNAMIC(cvCSrvrItem, COleServerItem)

cvCSrvrItem::cvCSrvrItem(cvCTestDoc* pContainerDoc)
	: COleServerItem(pContainerDoc, TRUE)
{
}

cvCSrvrItem::~cvCSrvrItem()
{
}

void cvCSrvrItem::Serialize(CArchive& ar)
{
	if (!IsLinkedItem())
	{
		cvCTestDoc* pDoc = GetDocument();
		ASSERT_VALID(pDoc);
		pDoc->Serialize(ar);
	}
}

BOOL cvCSrvrItem::OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize)
{
	if (dwDrawAspect != DVASPECT_CONTENT)
		return COleServerItem::OnGetExtent(dwDrawAspect, rSize);

	cvCTestDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	rSize = CSize(3000, 3000);   // 3000 x 3000 HIMETRIC units

	return TRUE;
}

BOOL cvCSrvrItem::OnDraw(CDC* pDC, CSize& rSize)
{
	UNREFERENCED_PARAMETER(rSize);

	cvCTestDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	pDC->SetMapMode(MM_ANISOTROPIC);
	pDC->SetWindowOrg(0,0);
	pDC->SetWindowExt(3000, 3000);

	return TRUE;
}


#ifdef _DEBUG
void cvCSrvrItem::AssertValid() const
{
	COleServerItem::AssertValid();
}

void cvCSrvrItem::Dump(CDumpContext& dc) const
{
	COleServerItem::Dump(dc);
}
#endif

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


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions