Click here to Skip to main content
15,884,298 members
Articles / Web Development / HTML

Flicker Free Drawing In MFC

Rate me:
Please Sign up or sign in to vote.
4.96/5 (174 votes)
25 Mar 2002CPOL1 min read 1.2M   18K   314  
A simple animation example which is used to show CMemDC in several modes
// ParticleTestCtlPpg.cpp : Implementation of the CParticleTestCtlPropPage property page class.

#include "stdafx.h"
#include "ParticleTestCtl.h"
#include "ParticleTestCtlPpg.h"

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


IMPLEMENT_DYNCREATE(CParticleTestCtlPropPage, COlePropertyPage)


/////////////////////////////////////////////////////////////////////////////
// Message map

BEGIN_MESSAGE_MAP(CParticleTestCtlPropPage, COlePropertyPage)
	//{{AFX_MSG_MAP(CParticleTestCtlPropPage)
	// NOTE - ClassWizard will add and remove message map entries
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// Initialize class factory and guid

IMPLEMENT_OLECREATE_EX(CParticleTestCtlPropPage, "PARTICLETESTCTL.ParticleTestCtlPropPage.1",
	0x3a4b6262, 0x9ea6, 0x11d3, 0xab, 0x75, 0, 0x80, 0x5f, 0xc7, 0x3d, 0x5)


/////////////////////////////////////////////////////////////////////////////
// CParticleTestCtlPropPage::CParticleTestCtlPropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CParticleTestCtlPropPage

BOOL CParticleTestCtlPropPage::CParticleTestCtlPropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_PARTICLETESTCTL_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, NULL);
}


/////////////////////////////////////////////////////////////////////////////
// CParticleTestCtlPropPage::CParticleTestCtlPropPage - Constructor

CParticleTestCtlPropPage::CParticleTestCtlPropPage() :
	COlePropertyPage(IDD, IDS_PARTICLETESTCTL_PPG_CAPTION)
{
	//{{AFX_DATA_INIT(CParticleTestCtlPropPage)
	// NOTE: ClassWizard will add member initialization here
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA_INIT
}


/////////////////////////////////////////////////////////////////////////////
// CParticleTestCtlPropPage::DoDataExchange - Moves data between page and properties

void CParticleTestCtlPropPage::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CParticleTestCtlPropPage)
	// NOTE: ClassWizard will add DDP, DDX, and DDV calls here
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA_MAP
	DDP_PostProcessing(pDX);
}


/////////////////////////////////////////////////////////////////////////////
// CParticleTestCtlPropPage 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I work at Tektronix in Beaverton OR. I've been programming for fun since 1975 (I started while in a Computer Explorer Scout group in Spokane WA). I've been programming in C since 1979 and I've been working professionally since 1983.

I really enjoy www.codeproject.com. It has saved me an incredible amount of time. I only hope my small contributions have given back some of what I've taken.

Comments and Discussions