00001
00002
00003
00004 #include "stdafx.h"
00005 #include "VisageLink.h"
00006
00007 #include "MainFrm.h"
00008 #include "VisageLinkDoc.h"
00009
00010 #ifdef _DEBUG
00011 #define new DEBUG_NEW
00012 #undef THIS_FILE
00013 static char THIS_FILE[] = __FILE__;
00014 #endif
00015
00016
00017
00018
00019 BEGIN_MESSAGE_MAP(CVisageLinkApp, CWinApp)
00020
00021 ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00022
00023
00024
00025
00026 ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00027 ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00028
00029 ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00030 END_MESSAGE_MAP()
00031
00032
00033
00034
00035 extern void initializeVisageLicenseManager(char *path);
00036 CVisageLinkApp::CVisageLinkApp()
00037 {
00038 initializeVisageLicenseManager(".");
00039
00040
00041 }
00042
00043
00044
00045
00046 CVisageLinkApp theApp;
00047
00048
00049
00050
00051 BOOL CVisageLinkApp::InitInstance()
00052 {
00053
00054
00055
00056
00057
00058 #ifdef _AFXDLL
00059 Enable3dControls();
00060 #else
00061
00062 #endif
00063
00064
00065
00066
00067 SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00068
00069 LoadStdProfileSettings();
00070
00071
00072
00073
00074 CSingleDocTemplate* pDocTemplate;
00075 pDocTemplate = new CSingleDocTemplate(
00076 IDR_MAINFRAME,
00077 RUNTIME_CLASS(CVisageLinkDoc),
00078 RUNTIME_CLASS(CMainFrame),
00079 RUNTIME_CLASS(COpenGLWnd));
00080 AddDocTemplate(pDocTemplate);
00081
00082
00083 CCommandLineInfo cmdInfo;
00084 ParseCommandLine(cmdInfo);
00085
00086
00087 if (!ProcessShellCommand(cmdInfo))
00088 return FALSE;
00089
00090
00091 m_pMainWnd->ShowWindow(SW_SHOW);
00092 m_pMainWnd->UpdateWindow();
00093
00094 return TRUE;
00095 }
00096
00097
00098
00099
00100
00101 class CAboutDlg : public CDialog
00102 {
00103 public:
00104 CAboutDlg();
00105
00106
00107
00108 enum { IDD = IDD_ABOUTBOX };
00109
00110
00111
00112
00113 protected:
00114 virtual void DoDataExchange(CDataExchange* pDX);
00115
00116
00117
00118 protected:
00119
00120
00121
00122 DECLARE_MESSAGE_MAP()
00123 };
00124
00125 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00126 {
00127
00128
00129 }
00130
00131 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00132 {
00133 CDialog::DoDataExchange(pDX);
00134
00135
00136 }
00137
00138 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00139
00140
00141
00142 END_MESSAGE_MAP()
00143
00144
00145 void CVisageLinkApp::OnAppAbout()
00146 {
00147 CAboutDlg aboutDlg;
00148 aboutDlg.DoModal();
00149 }
00150
00151
00152
00153