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

  1. // UseATLstrX.cpp : Defines the class behaviors for the application.
  2.  
  3. #include "stdafx.h"
  4. #include "UseATLstrX.h"
  5. #include "UseATLstrXDlg.h"
  6.  
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12.  
  13. // CUseATLstrXApp
  14. BEGIN_MESSAGE_MAP(CUseATLstrXApp, CWinApp)
  15.     //{{AFX_MSG_MAP(CUseATLstrXApp)
  16.     //}}AFX_MSG
  17.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  18. END_MESSAGE_MAP()
  19.  
  20. // CUseATLstrXApp construction
  21. CUseATLstrXApp::CUseATLstrXApp()
  22. {
  23. }
  24.  
  25. // The one and only CUseATLstrXApp object
  26. CUseATLstrXApp theApp;
  27.  
  28. // CUseATLstrXApp initialization
  29. BOOL CUseATLstrXApp::InitInstance()
  30. {
  31.     if (!AfxOleInit())
  32.     {
  33.         AfxMessageBox("Unable to register OLE libraries.");
  34.         return FALSE;
  35.     }
  36.  
  37.     CUseATLstrXDlg dlg;
  38.     m_pMainWnd = &dlg;
  39.     
  40.     dlg.DoModal();
  41.  
  42.     return FALSE;
  43. }
  44.