home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 1999 October / PCpro_1999_10.ISO / Tools / vbcrypt / Control / Source / DESCTL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-23  |  2.5 KB  |  87 lines

  1. #if !defined(AFX_DESCTL_H__07D7C6F5_AE76_11D0_9A6F_000100000000__INCLUDED_)
  2. #define AFX_DESCTL_H__07D7C6F5_AE76_11D0_9A6F_000100000000__INCLUDED_
  3.  
  4. #if _MSC_VER >= 1000
  5. #pragma once
  6. #endif // _MSC_VER >= 1000
  7.  
  8. // DESCtl.h : Declaration of the CDESCtrl ActiveX Control class.
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CDESCtrl : See DESCtl.cpp for implementation.
  12.  
  13. class CDESCtrl : public COleControl
  14. {
  15.     DECLARE_DYNCREATE(CDESCtrl)
  16.   DES Encryptor, Decryptor;
  17.   CString m_Key;
  18.   BOOL bKeySet;
  19. // Constructor
  20. public:
  21.     CDESCtrl();
  22.   BOOL OnSetExtent( LPSIZEL lpSizeL );
  23. // Overrides
  24.     // ClassWizard generated virtual function overrides
  25.     //{{AFX_VIRTUAL(CDESCtrl)
  26.     public:
  27.     virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  28.     virtual void DoPropExchange(CPropExchange* pPX);
  29.     virtual void OnResetState();
  30.     //}}AFX_VIRTUAL
  31.  
  32. // Implementation
  33. protected:
  34.     ~CDESCtrl();
  35.  
  36.     BEGIN_OLEFACTORY(CDESCtrl)        // Class factory and guid
  37.         virtual BOOL VerifyUserLicense();
  38.         virtual BOOL GetLicenseKey(DWORD, BSTR FAR*);
  39.     END_OLEFACTORY(CDESCtrl)
  40.  
  41.     DECLARE_OLETYPELIB(CDESCtrl)      // GetTypeInfo
  42.     DECLARE_PROPPAGEIDS(CDESCtrl)     // Property page IDs
  43.     DECLARE_OLECTLTYPE(CDESCtrl)        // Type name and misc status
  44.  
  45. // Message maps
  46.     //{{AFX_MSG(CDESCtrl)
  47.         // NOTE - ClassWizard will add and remove member functions here.
  48.         //    DO NOT EDIT what you see in these blocks of generated code !
  49.     //}}AFX_MSG
  50.     DECLARE_MESSAGE_MAP()
  51.  
  52. // Dispatch maps
  53.     //{{AFX_DISPATCH(CDESCtrl)
  54.     afx_msg VARIANT GetKey();
  55.     afx_msg void SetKey(const VARIANT FAR& newValue);
  56.     afx_msg void EncryptFile(LPCTSTR PlaintextFile, LPCTSTR CrypttextFile, const VARIANT FAR& FailIfExists);
  57.     afx_msg BSTR EncryptString(const VARIANT FAR& Plaintext);
  58.     afx_msg BSTR DecryptString(const VARIANT FAR& Crypttext);
  59.     afx_msg void DecryptFile(LPCTSTR CrypttextFile, LPCTSTR PlaintextFile, const VARIANT FAR& FailIfExists);
  60.     //}}AFX_DISPATCH
  61.     DECLARE_DISPATCH_MAP()
  62.  
  63.     afx_msg void AboutBox();
  64.  
  65. // Event maps
  66.     //{{AFX_EVENT(CDESCtrl)
  67.     //}}AFX_EVENT
  68.     DECLARE_EVENT_MAP()
  69.  
  70. // Dispatch and event IDs
  71. public:
  72.     enum {
  73.     //{{AFX_DISP_ID(CDESCtrl)
  74.     dispidKey = 1L,
  75.     dispidEncryptFile = 2L,
  76.     dispidEncryptString = 3L,
  77.     dispidDecryptString = 4L,
  78.     dispidDecryptFile = 5L,
  79.     //}}AFX_DISP_ID
  80.     };
  81. };
  82.  
  83. //{{AFX_INSERT_LOCATION}}
  84. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  85.  
  86. #endif // !defined(AFX_DESCTL_H__07D7C6F5_AE76_11D0_9A6F_000100000000__INCLUDED)
  87.