Click here to Skip to main content
12,254,527 members (64,531 online)
Click here to Skip to main content
Articles » Multimedia » GDI » General » Downloads

Stats

194.2K views
6.6K downloads
123 bookmarked
Posted

Animated Dialog Windows

, 17 Apr 2000
A class that provides some simple, yet spectacular window animation effects. Try the demo!
// TestDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Anim.h"
#include "TestDlg.h"

#include "AnimEffect.h"


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

/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog


CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CTestDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CTestDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CTestDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTestDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
	//{{AFX_MSG_MAP(CTestDlg)
	ON_WM_CREATE()
	ON_WM_DESTROY()
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTestDlg message handlers



int CTestDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	///////////////////
	CRect rc(lpCreateStruct->x, lpCreateStruct->y, 
		lpCreateStruct->x + lpCreateStruct->cx,
		lpCreateStruct->y + lpCreateStruct->cy );

	AnimEffect ae;
	ae.Open( rc );
	///////////////////
	return 0;
}

void CTestDlg::OnDestroy() 
{
	///////////////////
	CRect rc;
	GetWindowRect( rc );
	ShowWindow(SW_HIDE);
	
	AnimEffect ae;
	ae.Close( rc );
	///////////////////
	CDialog::OnDestroy();
}

void CTestDlg::OnClose() 
{
	CDialog::OnClose();
	OutputDebugString("On close\r\n");
	///////////////////
	CRect rc;
	GetWindowRect( rc );
	
	AnimEffect ae;
	ae.Close( rc );
	///////////////////
}


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

You may also be interested in...

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