// SplashDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ArticleSubmitter.h"
#include "SplashDlg.h"
#include ".\splashdlg.h"


// CSplashDlg dialog

IMPLEMENT_DYNAMIC(CSplashDlg, CDialog)
CSplashDlg::CSplashDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CSplashDlg::IDD, pParent)
{
}

CSplashDlg::~CSplashDlg()
{
}

void CSplashDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_SPLASH, mSplash);
}


BEGIN_MESSAGE_MAP(CSplashDlg, CDialog)
	ON_WM_TIMER()
END_MESSAGE_MAP()


// CSplashDlg message handlers

BOOL CSplashDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	RECT r1;
	GetWindowRect( &r1 );

	MoveWindow( r1.left, r1.top, 500, 300 );
	mSplash.MoveWindow( 0, 0, 500, 300 );
	CImage* image = new CImage();
	HRESULT hr = image->Load( _T("splash.jpg") );
	mSplash.SetBitmap( *image );
	SetTimer( 12, 3000, 0 );
	return TRUE;
}

void CSplashDlg::OnTimer(UINT nIDEvent)
{
	if (nIDEvent == 12)
	{
		CDialog::OnOK();
	}
	CDialog::OnTimer(nIDEvent);
}
