/*=========================================================================== * * File: Dfblok3d.CPP * Author: Dave Humphrey (uesp@m0use.net) * Created On: Tuesday, March 26, 2002 * * Implementation of the CDfbloke3dApp, main application class. * *=========================================================================*/ /* Include files */ #include "stdafx.h" #include "dfblok3d.h" #include "MainFrm.h" #include "dfblok3dDoc.h" #include "dfblok3dView.h" #include "aboutdlg.h" /*=========================================================================== * * Begin Local Variable Definitions * *=========================================================================*/ /* The main application object */ CDfblok3dApp theApp; #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif /*=========================================================================== * End of Local Variable Definitions *=========================================================================*/ /*=========================================================================== * * Begin CDfblok3dApp Message Map * *=========================================================================*/ BEGIN_MESSAGE_MAP(CDfblok3dApp, CWinApp) //{{AFX_MSG_MAP(CDfblok3dApp) ON_COMMAND(ID_APP_ABOUT, OnAppAbout) //}}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() /*=========================================================================== * End of CDfblok3dApp Message Map *=========================================================================*/ /*=========================================================================== * * Class CDfblok3dApp Constructor * *=========================================================================*/ CDfblok3dApp::CDfblok3dApp() { } /*=========================================================================== * End of Class CDfblok3dApp Constructor *=========================================================================*/ /*=========================================================================== * * Class CDfblok3dApp Method - BOOL InitInstance (); * *=========================================================================*/ BOOL CDfblok3dApp::InitInstance() { AfxEnableControlContainer(); #ifdef _AFXDLL Enable3dControls(); #else Enable3dControlsStatic(); #endif /* Change the registry key under which our settings are stored. */ SetRegistryKey(_T("DfBlok3D")); /* Load standard INI file options (including MRU) */ LoadStdProfileSettings(); /* 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(CDfblok3dDoc), RUNTIME_CLASS(CMainFrame), RUNTIME_CLASS(CDfblok3dView)); AddDocTemplate(pDocTemplate); /* Parse command line for standard shell commands, DDE, file open */ CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); /* Dispatch commands specified on the command line */ if (!ProcessShellCommand(cmdInfo)) return FALSE; /* The one and only window has been initialized, so show and update it. */ m_pMainWnd->ShowWindow(SW_SHOW); m_pMainWnd->UpdateWindow(); return TRUE; } /*=========================================================================== * End of Class Method CDfblok3dApp::InitInstance() *=========================================================================*/ /*=========================================================================== * * Class CDfblok3dApp Event - void OnAppAbout (); * *=========================================================================*/ void CDfblok3dApp::OnAppAbout() { CAboutDlg aboutDlg; aboutDlg.DoModal(); } /*=========================================================================== * End of Class Event CDfblok3dApp::OnAppAbout() *=========================================================================*/