#include "stdafx.h"
#include "CAppWnd.h"
#include "CMainWnd.h"
#include "template.h"

BEGIN_MESSAGE_MAP(CAppWnd, CWinApp)

END_MESSAGE_MAP()

CAppWnd::CAppWnd()
	:CWinApp()
{ }

CAppWnd::~CAppWnd()
{ }

BOOL CAppWnd::InitInstance()
{
	this->m_pMainWnd = new CMainWnd;
	this->m_pMainWnd->ShowWindow(SW_SHOW);
	this->m_pMainWnd->UpdateWindow();

	agk::SetCompanyName(COMPANY_NAME);

	return CWinApp::InitInstance();
}

INT CAppWnd::Run()
{
//	if (!agk::IsCapturingImage()) App.Loop();

	return CWinApp::Run();
}

BOOL CAppWnd::OnIdle(LONG lCount)
{
	if (!agk::IsCapturingImage()) App.Loop();

	return TRUE; //give the window time to update itself.
}


CAppWnd The_App;