Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » GDI » General » Downloads
 
Add your own
alternative version

Animated Dialog Windows

, 17 Apr 2000
A class that provides some simple, yet spectacular window animation effects. Try the demo!
anieffect_demo.zip
res
Anim.ico
Anim.dsp
Anim.dsw
AnimateWindow.exe
IOUPG.NFO
anieffect_src.zip
IOUPG.NFO
// Written by SiGMan / iO UpG  13-04-2000
// 
//
// AnimEffect.h: interface for the AnimEffect class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ANIMEFFECT_H__9AED4B93_0A83_4B4E_B6ED_1B3A133E2600__INCLUDED_)
#define AFX_ANIMEFFECT_H__9AED4B93_0A83_4B4E_B6ED_1B3A133E2600__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

enum AnimType {
	AnimInit, AnimDraw, AnimErase, AnimTerm
};

struct AnimData
{
	BOOL	bOpen;
	RECT	rcScreen;
	RECT	rcWnd;
	int		iParameter;
	int		iAfterimages;
	int		iTotalSteps;
	int		iStep;
	POINT	ptRelRightTop;
	POINT	ptCenter;
	HWND	hWnd;
	HDC		hDC;
	enum	AnimType animType;
	BYTE	bBuffer[4000];
};


class AnimEffect  
{
public:
	enum EffectType {
		Random=-1,
		Spin=0,
		Vortex,
		ScatterGather,
		Spike,
		Fireworks
	};

	typedef BOOL (*EFFUNC)( AnimData * );

	AnimEffect();
	virtual ~AnimEffect();

	void Setup( int iSteps, int iAfterimages, int iDelay = 10);
	void Effect( EffectType effect );
	void Open( const CRect &rcWnd );
	void Close( const CRect &rcWnd );

private:
	void Defaults();
	void ChooseFunc();
	void Animate( AnimData &animData );

private:
	RECT	m_rcScreen;
	int		m_iParameter;
	int		m_iAfterimages;
	int		m_iTotalSteps;
	int		m_iDelay;
	EffectType	m_Effect;
	EFFUNC	m_Func;

	RECT	m_rcWnd;
	POINT	m_ptRelRightTop;
	POINT	m_ptCenter;

	HWND	m_hWnd;
	HDC		m_hDC;
	HPEN	m_hPen;
};

#endif // !defined(AFX_ANIMEFFECT_H__9AED4B93_0A83_4B4E_B6ED_1B3A133E2600__INCLUDED_)

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

Anton Stuck

Russian Federation Russian Federation
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.1411023.1 | Last Updated 18 Apr 2000
Article Copyright 2000 by Anton Stuck
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid