Main Page   Class Hierarchy   Compound List   File List   Compound Members  

VisageLink.cpp

00001 // VisageLink.cpp : Defines the class behaviors for the application.
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 // CVisageLinkApp
00018 
00019 BEGIN_MESSAGE_MAP(CVisageLinkApp, CWinApp)
00020         //{{AFX_MSG_MAP(CVisageLinkApp)
00021         ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
00022                 // NOTE - the ClassWizard will add and remove mapping macros here.
00023                 //    DO NOT EDIT what you see in these blocks of generated code!
00024         //}}AFX_MSG_MAP
00025         // Standard file based document commands
00026         ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
00027         ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
00028         // Standard print setup command
00029         ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
00030 END_MESSAGE_MAP()
00031 
00032 /////////////////////////////////////////////////////////////////////////////
00033 // CVisageLinkApp construction
00034 
00035 extern void initializeVisageLicenseManager(char *path);
00036 CVisageLinkApp::CVisageLinkApp()
00037 {
00038         initializeVisageLicenseManager(".");
00039         // TODO: add construction code here,
00040         // Place all significant initialization in InitInstance
00041 }
00042 
00043 /////////////////////////////////////////////////////////////////////////////
00044 // The one and only CVisageLinkApp object
00045 
00046 CVisageLinkApp theApp;
00047 
00048 /////////////////////////////////////////////////////////////////////////////
00049 // CVisageLinkApp initialization
00050 
00051 BOOL CVisageLinkApp::InitInstance()
00052 {
00053         // Standard initialization
00054         // If you are not using these features and wish to reduce the size
00055         //  of your final executable, you should remove from the following
00056         //  the specific initialization routines you do not need.
00057 
00058 #ifdef _AFXDLL
00059         Enable3dControls();                     // Call this when using MFC in a shared DLL
00060 #else
00061 //      Enable3dControlsStatic();       // Call this when linking to MFC statically
00062 #endif
00063 
00064         // Change the registry key under which our settings are stored.
00065         // TODO: You should modify this string to be something appropriate
00066         // such as the name of your company or organization.
00067         SetRegistryKey(_T("Local AppWizard-Generated Applications"));
00068 
00069         LoadStdProfileSettings();  // Load standard INI file options (including MRU)
00070 
00071         // Register the application's document templates.  Document templates
00072         //  serve as the connection between documents, frame windows and views.
00073 
00074         CSingleDocTemplate* pDocTemplate;
00075         pDocTemplate = new CSingleDocTemplate(
00076                 IDR_MAINFRAME,
00077                 RUNTIME_CLASS(CVisageLinkDoc),
00078                 RUNTIME_CLASS(CMainFrame),       // main SDI frame window
00079                 RUNTIME_CLASS(COpenGLWnd));
00080         AddDocTemplate(pDocTemplate);
00081 
00082         // Parse command line for standard shell commands, DDE, file open
00083         CCommandLineInfo cmdInfo;
00084         ParseCommandLine(cmdInfo);
00085 
00086         // Dispatch commands specified on the command line
00087         if (!ProcessShellCommand(cmdInfo))
00088                 return FALSE;
00089 
00090         // The one and only window has been initialized, so show and update it.
00091         m_pMainWnd->ShowWindow(SW_SHOW);
00092         m_pMainWnd->UpdateWindow();
00093 
00094         return TRUE;
00095 }
00096 
00097 
00098 /////////////////////////////////////////////////////////////////////////////
00099 // CAboutDlg dialog used for App About
00100 
00101 class CAboutDlg : public CDialog
00102 {
00103 public:
00104         CAboutDlg();
00105 
00106 // Dialog Data
00107         //{{AFX_DATA(CAboutDlg)
00108         enum { IDD = IDD_ABOUTBOX };
00109         //}}AFX_DATA
00110 
00111         // ClassWizard generated virtual function overrides
00112         //{{AFX_VIRTUAL(CAboutDlg)
00113         protected:
00114         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00115         //}}AFX_VIRTUAL
00116 
00117 // Implementation
00118 protected:
00119         //{{AFX_MSG(CAboutDlg)
00120                 // No message handlers
00121         //}}AFX_MSG
00122         DECLARE_MESSAGE_MAP()
00123 };
00124 
00125 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
00126 {
00127         //{{AFX_DATA_INIT(CAboutDlg)
00128         //}}AFX_DATA_INIT
00129 }
00130 
00131 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
00132 {
00133         CDialog::DoDataExchange(pDX);
00134         //{{AFX_DATA_MAP(CAboutDlg)
00135         //}}AFX_DATA_MAP
00136 }
00137 
00138 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
00139         //{{AFX_MSG_MAP(CAboutDlg)
00140                 // No message handlers
00141         //}}AFX_MSG_MAP
00142 END_MESSAGE_MAP()
00143 
00144 // App command to run the dialog
00145 void CVisageLinkApp::OnAppAbout()
00146 {
00147         CAboutDlg aboutDlg;
00148         aboutDlg.DoModal();
00149 }
00150 
00151 /////////////////////////////////////////////////////////////////////////////
00152 // CVisageLinkApp message handlers
00153 

Generated on Wed Nov 8 16:13:38 2006 for VisageLink by doxygen 1.3.1