ctlmodul.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #include "stdafx.h"
  11. #ifndef _AFX_NO_OCX_SUPPORT
  12. #ifdef _DEBUG
  13. #undef THIS_FILE
  14. static char THIS_FILE[] = __FILE__;
  15. #endif
  16. #define new DEBUG_NEW
  17. #ifdef AFX_CORE1_SEG
  18. #pragma code_seg(AFX_CORE1_SEG)
  19. #endif
  20. /////////////////////////////////////////////////////////////////////////////
  21. // COleControlModule::InitInstance
  22. IMPLEMENT_DYNAMIC(COleControlModule, CWinApp)
  23. BOOL COleControlModule::InitInstance()
  24. {
  25. #ifdef _AFXDLL
  26. // wire up resources from OLE DLL
  27. AfxOleInitModule();
  28. #endif
  29. COleObjectFactory::RegisterAll();
  30. return TRUE;
  31. }
  32. /////////////////////////////////////////////////////////////////////////////
  33. // COleControlModule::ExitInstance
  34. int COleControlModule::ExitInstance()
  35. {
  36. COleObjectFactory::RevokeAll();
  37. return CWinApp::ExitInstance();
  38. }
  39. #endif // !_AFX_NO_OCX_SUPPORT