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

  1. // UseAtlTrig.cpp : Defines the class behaviors for the application.
  2.  
  3. #include "stdafx.h"
  4. #include "UseAtlTrig.h"
  5.  
  6. #include "atltrig.h"
  7.  
  8. #include "UseAtlTrigDlg.h"
  9.  
  10. #ifdef _DEBUG
  11. #define new DEBUG_NEW
  12. #undef THIS_FILE
  13. static char THIS_FILE[] = __FILE__;
  14. #endif
  15.  
  16. // CUseAtlTrigApp
  17. BEGIN_MESSAGE_MAP(CUseAtlTrigApp, CWinApp)
  18.     //{{AFX_MSG_MAP(CUseAtlTrigApp)
  19.         // NOTE - the ClassWizard will add and remove mapping macros here.
  20.         //    DO NOT EDIT what you see in these blocks of generated code!
  21.     //}}AFX_MSG
  22.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  23. END_MESSAGE_MAP()
  24.  
  25. // CUseAtlTrigApp construction
  26. CUseAtlTrigApp::CUseAtlTrigApp()
  27. {
  28. }
  29.  
  30. // The one and only CUseAtlTrigApp object
  31. CUseAtlTrigApp theApp;
  32.  
  33. // CUseAtlTrigApp initialization
  34. BOOL CUseAtlTrigApp::InitInstance()
  35. {
  36.     if (!AfxOleInit())
  37.     {
  38.         AfxMessageBox("Unable to register OLE libraries.");
  39.         return FALSE;
  40.     }
  41.  
  42.     CUseAtlTrigDlg dlg;
  43.     m_pMainWnd = &dlg;
  44.     dlg.DoModal();
  45.  
  46.     return FALSE;
  47. }
  48.