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

#include "stdafx.h"
#include "winaping.h"

#include "mainfrm.h"
#include "winapdoc.h"
#include "goview.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CWinapingApp

BEGIN_MESSAGE_MAP(CWinapingApp, CWinApp)
        //{{AFX_MSG_MAP(CWinapingApp)
                // NOTE - the ClassWizard will add and remove mapping macros here.
                //    DO NOT EDIT what you see in these blocks of generated code!
        //}}AFX_MSG_MAP
        // Standard file based document commands
        ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
        ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWinapingApp construction

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

/////////////////////////////////////////////////////////////////////////////
// The one and only CWinapingApp object

CWinapingApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CWinapingApp initialization

BOOL CWinapingApp::InitInstance()
{
        // 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.

//      Enable3dControls();

        LoadStdProfileSettings();  // Load standard INI file options (including MRU)

        // Register the application's document templates.  Document templates
        //  serve as the connection between documents, frame windows and views.

        CSingleDocTemplate* pDocTemplate;
        pDocTemplate = new CSingleDocTemplate(
                IDR_MAINFRAME,
                RUNTIME_CLASS(CWinapingDoc),
                RUNTIME_CLASS(CMainFrame),       // main SDI frame window
                RUNTIME_CLASS(CGoView));
//              RUNTIME_CLASS(CWinapingView));
        AddDocTemplate(pDocTemplate);

        // create a new (empty) document
        OnFileNew();

        if (m_lpCmdLine[0] != '\0')
        {
                // TODO: add command line processing here
        }

        return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CWinapingApp commands
