home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / controls / licensed / licenctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  1.8 KB  |  73 lines

  1. // licenctl.h : Declaration of the CLicensedCtrl OLE control class.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CLicensedCtrl : See licenctl.cpp for implementation.
  15.  
  16. class CLicensedCtrl : public COleControl
  17. {
  18.     DECLARE_DYNCREATE(CLicensedCtrl)
  19.  
  20. // Constructor
  21. public:
  22.     CLicensedCtrl();
  23.  
  24. // Overrides
  25.  
  26.     // Drawing function
  27.     virtual void OnDraw(
  28.                 CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  29.  
  30.     // Persistence
  31.     virtual void DoPropExchange(CPropExchange* pPX);
  32.  
  33.     // Reset control state
  34.     virtual void OnResetState();
  35.  
  36. // Implementation
  37. protected:
  38.     ~CLicensedCtrl();
  39.  
  40.     BEGIN_OLEFACTORY(CLicensedCtrl)     // Class factory and guid
  41.         virtual BOOL VerifyUserLicense();
  42.         virtual BOOL GetLicenseKey(DWORD, BSTR FAR*);
  43.     END_OLEFACTORY(CLicensedCtrl)
  44.  
  45.     DECLARE_OLETYPELIB(CLicensedCtrl)       // GetTypeInfo
  46.     DECLARE_PROPPAGEIDS(CLicensedCtrl)      // Property page IDs
  47.     DECLARE_OLECTLTYPE(CLicensedCtrl)       // Type name and misc status
  48.  
  49. // Message maps
  50.     //{{AFX_MSG(CLicensedCtrl)
  51.     //}}AFX_MSG
  52.     DECLARE_MESSAGE_MAP()
  53.  
  54. // Dispatch maps
  55.     //{{AFX_DISPATCH(CLicensedCtrl)
  56.     //}}AFX_DISPATCH
  57.     DECLARE_DISPATCH_MAP()
  58.  
  59.     afx_msg void AboutBox();
  60.  
  61. // Event maps
  62.     //{{AFX_EVENT(CLicensedCtrl)
  63.     //}}AFX_EVENT
  64.     DECLARE_EVENT_MAP()
  65.  
  66. // Dispatch and event IDs
  67. public:
  68.     enum {
  69.     //{{AFX_DISP_ID(CLicensedCtrl)
  70.     //}}AFX_DISP_ID
  71.     };
  72. };
  73.