// SplashApp.cpp : インプリメンテーション ファイル
//

#include "stdafx.h"
#include "SplashApp.h"
#include "SplashWnd.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSplashApp

IMPLEMENT_DYNCREATE(CSplashApp, CWinThread)

CSplashApp::CSplashApp()
{
	CreateThread();
}

CSplashApp::~CSplashApp()
{
}

BOOL CSplashApp::InitInstance()
{
	CSplashWnd *pSplashWnd = new CSplashWnd;
	if (pSplashWnd)
		pSplashWnd->Create();
	m_pMainWnd = pSplashWnd;
	return TRUE;
}

int CSplashApp::ExitInstance()
{
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CSplashApp, CWinThread)
	//{{AFX_MSG_MAP(CSplashApp)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSplashApp 
void CSplashApp::EndSplash()
{
	if (m_pMainWnd && ::IsWindow(m_pMainWnd->m_hWnd))
	{
		m_pMainWnd->SetWindowPos(&CWnd::wndBottom, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE);
		m_pMainWnd->PostMessage(WM_CLOSE);
	}
}

