home *** CD-ROM | disk | FTP | other *** search
/ Building OCXs / Building_OCXs_Que_1995.iso / code / ch09 / commctl.h < prev    next >
C/C++ Source or Header  |  1994-12-11  |  1KB  |  64 lines

  1. // commctl.h : Declaration of the CCommCtrl OLE control class.
  2.  
  3. /////////////////////////////////////////////////////////////////////////////
  4. // CCommCtrl : See commctl.cpp for implementation.
  5.  
  6. class CCommCtrl : public COleControl
  7. {
  8.     DECLARE_DYNCREATE(CCommCtrl)
  9.  
  10. // Constructor
  11. public:
  12.     CCommCtrl();
  13.  
  14. // Overrides
  15.  
  16.     // Drawing function
  17.     virtual void OnDraw(
  18.                 CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  19.  
  20.     // Persistence
  21.     virtual void DoPropExchange(CPropExchange* pPX);
  22.  
  23.     // Reset control state
  24.     virtual void OnResetState();
  25.  
  26. // Implementation
  27. protected:
  28.     ~CCommCtrl();
  29.  
  30.     DECLARE_OLECREATE_EX(CCommCtrl)    // Class factory and guid
  31.     DECLARE_OLETYPELIB(CCommCtrl)      // GetTypeInfo
  32.     DECLARE_PROPPAGEIDS(CCommCtrl)     // Property page IDs
  33.     DECLARE_OLECTLTYPE(CCommCtrl)        // Type name and misc status
  34.  
  35. // Message maps
  36.     //{{AFX_MSG(CCommCtrl)
  37.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  38.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  39.     //}}AFX_MSG
  40.     DECLARE_MESSAGE_MAP()
  41.  
  42. // Dispatch maps
  43.     //{{AFX_DISPATCH(CCommCtrl)
  44.     CString m_phoneNumber;
  45.     afx_msg void OnPhoneNumberChanged();
  46.     //}}AFX_DISPATCH
  47.     DECLARE_DISPATCH_MAP()
  48.  
  49.     afx_msg void AboutBox();
  50.  
  51. // Event maps
  52.     //{{AFX_EVENT(CCommCtrl)
  53.     //}}AFX_EVENT
  54.     DECLARE_EVENT_MAP()
  55.  
  56. // Dispatch and event IDs
  57. public:
  58.     enum {
  59.     //{{AFX_DISP_ID(CCommCtrl)
  60.     dispidPhoneNumber = 1L,
  61.     //}}AFX_DISP_ID
  62.     };
  63. };
  64.