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

Undo and Redo the "Easy" Way

, 20 Jun 2004
This article introduces a simple approach to in-memory transactions that can be used to implement Undo and Redo. The technique uses SEH and Virtual Memory and requires only STL and Win32.
transactions_complete.zip
Common
CER
Curve Simplification
Transactions
Utilities
DrawIt
res
DrawIt.ico
DrawItDoc.ico
Toolbar.bmp
vssver.scc
DrawItMDI
res
DrawItMDI.ico
DrawItMDI.manifest
DrawItMDIDoc.ico
mainfram.bmp
Toolbar.bmp
MemTest
Bin
release
DrawFunc.dll
DrawIt.exe
DrawItMDI.exe
XCrashReport.exe
XCrashReport.ini
DrawFunc
transactions_demo.zip
transactions_mfc_demo.zip
DrawIt.ico
DrawItDoc.ico
Toolbar.bmp
vssver.scc
transactions_mfc_mdi_demo.zip
DrawItMDI.ico
DrawItMDI.manifest
DrawItMDIDoc.ico
mainfram.bmp
Toolbar.bmp
transactions_src.zip
Transactions
// DPHullGL.cpp: implementation of the CDPHullGL class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "DPHullGL.h"

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

CDPHullGL::CDPHullGL()
{

}

CDPHullGL::~CDPHullGL()
{

}

void CDPHullGL::PlotCurve()
{
	int i;
	glBegin(GL_LINE_STRIP);
	for (i=0;i<m_iN;i++)
	{
		glVertex2f((GLfloat)m_pV[i][DP_XX],(GLfloat)m_pV[i][DP_YY]);
	}
	glEnd();
}

void CDPHullGL::PlotDPCurve()
{
	int i;
	glBegin(GL_LINE_STRIP);
	for (i=0;i<m_iNumResult;i++)
	{
		glVertex2f((GLfloat)(*m_ppR[i])[DP_XX],(GLfloat)(*m_ppR[i])[DP_YY]);
	}
	glEnd();
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

compiler

United States United States
A compiler warns of bogasity, ignore it at your peril. Unless you've done the compiler's job yourself, don't criticize it.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 21 Jun 2004
Article Copyright 2002 by compiler
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid