reman3/Rayman_X/cpa/Appli/MngData5/Src/DlgAbout.cpp

137 lines
4.2 KiB
C++

/*
=======================================================================================
Name : DlgAbout.cpp
Author : VL Date :17/07/97
Description : implementation of about dialog for MngData5 program
=======================================================================================
Modification -> Author : Date :
Description :
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "stdafx.h"
#include "mngdata5.h"
#include "DlgAbout.h"
#include "HelpId.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
CAboutDlg dialog
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : constructor
---------------------------------------------------------------------------------------
*/
CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/) : CDialog(CAboutDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CAboutDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
/*
---------------------------------------------------------------------------------------
Description : message map
---------------------------------------------------------------------------------------
*/
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_WM_TIMER()
ON_WM_DESTROY()
ON_WM_HELPINFO()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/*
=======================================================================================
CAboutDlg message handlers
=======================================================================================
*/
/*
---------------------------------------------------------------------------------------
Description : WM_INITDIALOG
---------------------------------------------------------------------------------------
*/
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_cCurBitmap = 0;
m_cNbBitmaps = 11;
m_a_oBitmap[0].LoadBitmap( IDB_BITMAP_ABOUT_0 );
m_a_oBitmap[1].LoadBitmap( IDB_BITMAP_ABOUT_1 );
m_a_oBitmap[2].LoadBitmap( IDB_BITMAP_ABOUT_2 );
m_a_oBitmap[3].LoadBitmap( IDB_BITMAP_ABOUT_3 );
m_a_oBitmap[4].LoadBitmap( IDB_BITMAP_ABOUT_4 );
m_a_oBitmap[5].LoadBitmap( IDB_BITMAP_ABOUT_5 );
m_a_oBitmap[6].LoadBitmap( IDB_BITMAP_ABOUT_6 );
m_a_oBitmap[7].LoadBitmap( IDB_BITMAP_ABOUT_7 );
m_a_oBitmap[8].LoadBitmap( IDB_BITMAP_ABOUT_8 );
m_a_oBitmap[9].LoadBitmap( IDB_BITMAP_ABOUT_9 );
m_a_oBitmap[10].LoadBitmap( IDB_BITMAP_ABOUT_10 );
m_uiTimer = SetTimer(1, 200, NULL );
((CStatic *) GetDlgItem( IDC_STATIC_ANIM ))->SetBitmap( HBITMAP(m_a_oBitmap[m_cCurBitmap]) );
return TRUE;
}
/*
---------------------------------------------------------------------------------------
Description : WM_DESTROY
---------------------------------------------------------------------------------------
*/
void CAboutDlg::OnDestroy()
{
CDialog::OnDestroy();
KillTimer( m_uiTimer );
for (m_cCurBitmap = 0; m_cCurBitmap < m_cNbBitmaps; m_cCurBitmap ++)
m_a_oBitmap[m_cCurBitmap].DeleteObject();
}
/*
---------------------------------------------------------------------------------------
Description : WM_TIMER
---------------------------------------------------------------------------------------
*/
void CAboutDlg::OnTimer(UINT nIDEvent)
{
CDialog::OnTimer(nIDEvent);
m_cCurBitmap ++;
if (m_cCurBitmap == m_cNbBitmaps)
m_cCurBitmap = 0;
((CStatic *) GetDlgItem( IDC_STATIC_ANIM ))->SetBitmap( HBITMAP(m_a_oBitmap[m_cCurBitmap]) );
}
/*
---------------------------------------------------------------------------------------
Description : WM_HELPINFO
---------------------------------------------------------------------------------------
*/
BOOL CAboutDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
::WinHelp(this->GetSafeHwnd(), C_szHelpFile, HELP_CONTEXT, IDH_J_SUMMARY );
return TRUE;
}