home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c12 / simpledual / simplectl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  2.1 KB  |  79 lines

  1. #if !defined(AFX_SIMPLECTL_H__C48A81EF_4384_11D0_9C9D_000000000000__INCLUDED_)
  2. #define AFX_SIMPLECTL_H__C48A81EF_4384_11D0_9C9D_000000000000__INCLUDED_
  3.  
  4. // SimpleCtl.h : Declaration of the CSimpleCtrl ActiveX Control class.
  5.  
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CSimpleCtrl : See SimpleCtl.cpp for implementation.
  8.  
  9. class CSimpleCtrl : public COleControl
  10. {
  11.     DECLARE_DYNCREATE(CSimpleCtrl)
  12.  
  13. // Constructor
  14. public:
  15.     CSimpleCtrl();
  16.  
  17. // Overrides
  18.     // ClassWizard generated virtual function overrides
  19.     //{{AFX_VIRTUAL(CSimpleCtrl)
  20.     public:
  21.     virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  22.     virtual void DoPropExchange(CPropExchange* pPX);
  23.     virtual void OnResetState();
  24.     //}}AFX_VIRTUAL
  25.  
  26. // Implementation
  27. protected:
  28.     long m_p1;
  29.     ~CSimpleCtrl();
  30.  
  31.     DECLARE_OLECREATE_EX(CSimpleCtrl)    // Class factory and guid
  32.     DECLARE_OLETYPELIB(CSimpleCtrl)      // GetTypeInfo
  33.     DECLARE_PROPPAGEIDS(CSimpleCtrl)     // Property page IDs
  34.     DECLARE_OLECTLTYPE(CSimpleCtrl)        // Type name and misc status
  35.  
  36. // Message maps
  37.     //{{AFX_MSG(CSimpleCtrl)
  38.     //}}AFX_MSG
  39.     DECLARE_MESSAGE_MAP()
  40.  
  41. // Dispatch maps
  42.     //{{AFX_DISPATCH(CSimpleCtrl)
  43.     afx_msg long GetP1();
  44.     afx_msg void SetP1(long nNewValue);
  45.     afx_msg void M1();
  46.     //}}AFX_DISPATCH
  47.     DECLARE_DISPATCH_MAP()
  48.  
  49. // Event maps
  50.     //{{AFX_EVENT(CSimpleCtrl)
  51.     void FireE1()
  52.         {FireEvent(eventidE1,EVENT_PARAM(VTS_NONE));}
  53.     //}}AFX_EVENT
  54.     DECLARE_EVENT_MAP()
  55.  
  56.     DECLARE_INTERFACE_MAP()
  57.  
  58.     BEGIN_DUAL_INTERFACE_PART(Nested, _DSimpleDual)
  59.         STDMETHOD(put_P1)(THIS_ long newP1);
  60.         STDMETHOD(get_P1)(THIS_ long * retval);
  61.         STDMETHOD(M1)(THIS_);
  62.     END_DUAL_INTERFACE_PART(Nested)
  63.  
  64. // Dispatch and event IDs
  65. public:
  66.     enum {
  67.     //{{AFX_DISP_ID(CSimpleCtrl)
  68.     dispidP1 = 1L,
  69.     dispidM1 = 2L,
  70.     eventidE1 = 1L,
  71.     //}}AFX_DISP_ID
  72.     };
  73. };
  74.  
  75. //{{AFX_INSERT_LOCATION}}
  76. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  77.  
  78. #endif // !defined(AFX_SIMPLECTL_H__C48A81EF_4384_11D0_9C9D_000000000000__INCLUDED)
  79.