home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / rrect.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-16  |  2.9 KB  |  93 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 2001                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10.  
  11. // RRect.cpp : Defines the initialization routines for the DLL.
  12. //
  13.  
  14. #include "stdafx.h"
  15. #include "RRect.h"
  16. #include "AutoRect.h"
  17.  
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CRoundRectApp
  27.  
  28. BEGIN_MESSAGE_MAP(CRoundRectApp, CWinApp)
  29.     //{{AFX_MSG_MAP(CRoundRectApp)
  30.         // NOTE - the ClassWizard will add and remove mapping macros here.
  31.         //    DO NOT EDIT what you see in these blocks of generated code!
  32.     //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CRoundRectApp construction
  37.  
  38. // DUAL_SUPPORT_START
  39. //    GUID for the type library (for registry functions)
  40. static const GUID LIBID_RoundRect = 
  41.     { 0x7724BB42L,0xB671,0x11D0,0x9B,0x3B,0x44,0x45,0x53,0x54,0x00,0x00 };
  42. // DUAL_SUPPORT_END
  43.  
  44. CRoundRectApp::CRoundRectApp()
  45. {
  46. }
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // The one and only CRoundRectApp object
  50.  
  51. CRoundRectApp theApp;
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CRoundRectApp initialization
  55.  
  56. BOOL CRoundRectApp::InitInstance()
  57. {
  58.       // Register all OLE server (factories) as running.  This enables the
  59.     //  OLE libraries to create objects from other applications.
  60.     COleObjectFactory::RegisterAll();
  61.  
  62.     // DUAL_SUPPORT_START
  63.     //    make sure the type library is registerd. Otherwise dual interface won't work!
  64.     //    note that we are embedding type library as a resource in this DLL.
  65.     AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_RoundRect);
  66.     // DUAL_SUPPORT_END
  67.  
  68.     return TRUE;
  69. }
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72. // Special entry points required for inproc servers
  73.  
  74. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  75. {
  76.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  77.     return AfxDllGetClassObject(rclsid, riid, ppv);
  78. }
  79.  
  80. STDAPI DllCanUnloadNow(void)
  81. {
  82.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  83.     return AfxDllCanUnloadNow();
  84. }
  85.  
  86. // by exporting DllRegisterServer, you can use regsvr.exe
  87. STDAPI DllRegisterServer(void)
  88. {
  89.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  90.     COleObjectFactory::UpdateRegistryAll();
  91.     return S_OK;
  92. }
  93.