home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / src / ctlmodul.cpp < prev    next >
C/C++ Source or Header  |  1998-06-16  |  1KB  |  52 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #include "stdafx.h"
  12.  
  13. #ifndef _AFX_NO_OCX_SUPPORT
  14.  
  15. #ifdef _DEBUG
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19.  
  20. #define new DEBUG_NEW
  21.  
  22. #ifdef AFX_CORE1_SEG
  23. #pragma code_seg(AFX_CORE1_SEG)
  24. #endif
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // COleControlModule::InitInstance
  28.  
  29. IMPLEMENT_DYNAMIC(COleControlModule, CWinApp)
  30.  
  31. BOOL COleControlModule::InitInstance()
  32. {
  33. #ifdef _AFXDLL
  34.     // wire up resources from OLE DLL
  35.     AfxOleInitModule();
  36. #endif
  37.  
  38.     COleObjectFactory::RegisterAll();
  39.     return TRUE;
  40. }
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // COleControlModule::ExitInstance
  44.  
  45. int COleControlModule::ExitInstance()
  46. {
  47.     COleObjectFactory::RevokeAll();
  48.     return CWinApp::ExitInstance();
  49. }
  50.  
  51. #endif // !_AFX_NO_OCX_SUPPORT
  52.