///////////////////////////////////////////////////////////////////////////// // // Implementation of the CMainApp class. // // Copyright © 2000-2001 Medicor Imaging. All rights reserved. // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MainApp.h" #include "MainDlg.h" ///////////////////////////////////////////////////////////////////////////// CMainApp theApp; ///////////////////////////////////////////////////////////////////////////// BEGIN_MESSAGE_MAP(CMainApp, CWinApp) //{{AFX_MSG_MAP(CMainApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// CMainApp::CMainApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } ///////////////////////////////////////////////////////////////////////////// BOOL CMainApp::InitInstance() { L_CHAR szPath[MAX_PATH]; L_INT pos; // 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. #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif LBase::LoadLibraries(LT_ALL_LEADLIB); //Unlock support for medical toolkit WRPUNLOCKSUPPORT(); //Test unlock support for medical toolkit if(LSettings::IsSupportLocked(L_SUPPORT_MEDICAL)) { AfxMessageBox("Medical-Express Support Must be unlocked for this demo!"); return FALSE; } //Set Help path CString AppName(AfxGetApp()->m_pszHelpFilePath); pos = AppName.ReverseFind('\\'); AppName.Delete(pos, AppName.GetLength() - pos); pos = AppName.ReverseFind('\\'); AppName.Delete(pos, AppName.GetLength() - pos); LoadString(NULL, IDS_HELP_PATH, szPath, MAX_PATH); AppName = AppName + szPath; free((void*)AfxGetApp()->m_pszHelpFilePath); AfxGetApp()->m_pszHelpFilePath=_tcsdup(AppName); //Main dialog window CMainDlg dlg; m_pMainWnd = &dlg; dlg.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } /////////////////////////////////////////////////////////////////////////////