home *** CD-ROM | disk | FTP | other *** search
/ Building OCXs / Building_OCXs_Que_1995.iso / code / ch11 / buttoctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-02  |  1.5 KB  |  66 lines

  1. // buttoctl.h : Declaration of the CButtonCtrl OLE control class.
  2.  
  3. /////////////////////////////////////////////////////////////////////////////
  4. // CButtonCtrl : See buttoctl.cpp for implementation.
  5.  
  6. class CButtonCtrl : public COleControl
  7. {
  8.     DECLARE_DYNCREATE(CButtonCtrl)
  9.  
  10. // Constructor
  11. public:
  12.     CButtonCtrl();
  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.     ~CButtonCtrl();
  29.  
  30.     DECLARE_OLECREATE_EX(CButtonCtrl)    // Class factory and guid
  31.     DECLARE_OLETYPELIB(CButtonCtrl)      // GetTypeInfo
  32.     DECLARE_PROPPAGEIDS(CButtonCtrl)     // Property page IDs
  33.     DECLARE_OLECTLTYPE(CButtonCtrl)        // Type name and misc status
  34.  
  35.     // Subclassed control support
  36.     BOOL PreCreateWindow(CREATESTRUCT& cs);
  37.     WNDPROC* GetSuperWndProcAddr(void);
  38.     LRESULT OnOcmCommand(WPARAM wParam, LPARAM lParam);
  39.  
  40. // Message maps
  41.     //{{AFX_MSG(CButtonCtrl)
  42.         // NOTE - ClassWizard will add and remove member functions here.
  43.         //    DO NOT EDIT what you see in these blocks of generated code !
  44.     //}}AFX_MSG
  45.     DECLARE_MESSAGE_MAP()
  46.  
  47. // Dispatch maps
  48.     //{{AFX_DISPATCH(CButtonCtrl)
  49.     //}}AFX_DISPATCH
  50.     DECLARE_DISPATCH_MAP()
  51.  
  52.     afx_msg void AboutBox();
  53.  
  54. // Event maps
  55.     //{{AFX_EVENT(CButtonCtrl)
  56.     //}}AFX_EVENT
  57.     DECLARE_EVENT_MAP()
  58.  
  59. // Dispatch and event IDs
  60. public:
  61.     enum {
  62.     //{{AFX_DISP_ID(CButtonCtrl)
  63.     //}}AFX_DISP_ID
  64.     };
  65. };
  66.