// ex8.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "ex8.h"

#include "MainFrm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx8App

BEGIN_MESSAGE_MAP(CEx8App, CWinApp)
	//{{AFX_MSG_MAP(CEx8App)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEx8App construction

CEx8App::CEx8App()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CEx8App object

CEx8App theApp;

/////////////////////////////////////////////////////////////////////////////
// CEx8App initialization

BOOL CEx8App::InitInstance()
{
	if (!AfxSocketInit())
	{
		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
		return FALSE;
	}

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.
	CMainFrame* pFrame = (CMainFrame*)(RUNTIME_CLASS(CMainFrame))->CreateObject();
	pFrame->LoadFrame(NULL, WS_POPUP);
	m_pMainWnd = pFrame;
	m_pMainWnd->ShowWindow(SW_NORMAL);
	pFrame->InitDirectDraw();
	return TRUE;
}

