Click here to Skip to main content
15,886,689 members
Articles / Desktop Programming / MFC

A Simple HTML Drawing Class

Rate me:
Please Sign up or sign in to vote.
4.72/5 (27 votes)
5 Aug 20034 min read 166.1K   5.3K   67  
Drawing HTML text onto a device context
// HTMLAtom.cpp: implementation of the CHTMLAtom class.
//
//////////////////////////////////////////////////////////////////////
// (c) Jerome Sopocko 2003
// this code worked last time I saw it
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "HTMLAtom.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CHTMLAtom::CHTMLAtom()
{
	m_nAscent = 0;
	m_nAlignment = 0;
	m_isHighlighted = false;

}

CHTMLAtom::CHTMLAtom(const CHTMLAtom & Atom)
{
	m_strText 		= Atom.m_strText;
	m_Font 			= Atom.m_Font;
	m_rctPosition 	= Atom.m_rctPosition;
	m_nAscent 		= Atom.m_nAscent;
	m_nAlignment 	= Atom.m_nAlignment;
	m_nLine 		= Atom.m_nLine;
	m_strURL 		= Atom.m_strURL;
	m_isHighlighted = Atom.m_isHighlighted;
}

CHTMLAtom::~CHTMLAtom()
{

}

void CHTMLAtom::DeleteArray(CObArray & arrArray)
{
	for ( int nObj=0; nObj < arrArray.GetSize(); nObj++)
		delete (CHTMLAtom *) arrArray[nObj];
	arrArray.RemoveAll();
}

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.


Written By
Web Developer
United Kingdom United Kingdom
Known as "The Wandering Geek", I have had to often change identities and countries due to the low quality level of the numerous software I have left behind.
Never wrote a software that did more than sorting 3 numbers which actually worked.
Hey but feel free to download my stuff!


Comments and Discussions