home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c13 / useatltrig2 / useatltrig.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.0 KB  |  50 lines

  1. // UseAtlTrig.cpp : Defines the class behaviors for the application.
  2.  
  3. #include "stdafx.h"
  4. #include "UseAtlTrig.h"
  5. #include "UseAtlTrigDlg.h"
  6.  
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12.  
  13. // CUseAtlTrigApp
  14. BEGIN_MESSAGE_MAP(CUseAtlTrigApp, CWinApp)
  15.     //{{AFX_MSG_MAP(CUseAtlTrigApp)
  16.     //}}AFX_MSG
  17.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  18. END_MESSAGE_MAP()
  19.  
  20. // CUseAtlTrigApp construction
  21. CUseAtlTrigApp::CUseAtlTrigApp()
  22. {
  23. }
  24.  
  25. // The one and only CUseAtlTrigApp object
  26. CUseAtlTrigApp theApp;
  27.  
  28. // CUseAtlTrigApp initialization
  29. BOOL CUseAtlTrigApp::InitInstance()
  30. {
  31.     // Initialize OLE libraries
  32.     if (!AfxOleInit())
  33.     {
  34.         AfxMessageBox("Unable to register OLE libraries.");
  35.         return FALSE;
  36.     }
  37.  
  38. #ifdef _AFXDLL
  39.     Enable3dControls();            // Call this when using MFC in a shared DLL
  40. #else
  41.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  42. #endif
  43.  
  44.     CUseAtlTrigDlg dlg;
  45.     m_pMainWnd = &dlg;
  46.     dlg.DoModal();
  47.  
  48.     return FALSE;
  49. }
  50.