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

  1. // ThelpCtl.h : Declaration of the CTesthelpCtrl 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. // CTesthelpCtrl : See ThelpCtl.cpp for implementation.
  15. class CTesthelpCtrl : public COleControl
  16. {
  17.      DECLARE_DYNCREATE(CTesthelpCtrl)
  18.  
  19. // Constructor
  20. public:
  21.  
  22.      void RelayEvent(UINT message, WPARAM wParam, LPARAM lParam);
  23.      CToolTipCtrl m_ttip;
  24.      LONG OnHelpCommand(UINT wParam, LONG lParam);
  25.  
  26.      CTesthelpCtrl();
  27. // Overrides
  28.  
  29.      // Drawing function
  30.      virtual void OnDraw(
  31.                     CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  32.  
  33.      // Persistence
  34.      virtual void DoPropExchange(CPropExchange* pPX);
  35.  
  36.      // Reset control state
  37.      virtual void OnResetState();
  38.  
  39. // Implementation
  40. protected:
  41.      ~CTesthelpCtrl();
  42.  
  43.      DECLARE_OLECREATE_EX(CTesthelpCtrl)    // Class factory and guid
  44.      DECLARE_OLETYPELIB(CTesthelpCtrl)      // GetTypeInfo
  45.      DECLARE_PROPPAGEIDS(CTesthelpCtrl)     // Property page IDs
  46.      DECLARE_OLECTLTYPE(CTesthelpCtrl)          // Type name and misc status
  47.  
  48. // Message maps
  49.      //{{AFX_MSG(CTesthelpCtrl)
  50.      afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  51.      afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  52.      afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  53.      afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  54.     //}}AFX_MSG
  55.      DECLARE_MESSAGE_MAP()
  56.  
  57. // Dispatch maps
  58.      //{{AFX_DISPATCH(CTesthelpCtrl)
  59.     CString m_szName1;
  60.     afx_msg void OnName1Changed();
  61.     CString m_szName2;
  62.     afx_msg void OnName2Changed();
  63.     CString m_szName3;
  64.     afx_msg void OnName3Changed();
  65.     BOOL m_bUseMyHelp;
  66.     afx_msg void OnUseMyHelpChanged();
  67.     BOOL m_bShowToolTip;
  68.     afx_msg void OnShowToolTipChanged();
  69.     CString m_szToolTipText;
  70.     afx_msg void OnToolTipTextChanged();
  71.     short m_nUsePopupHelp;
  72.     afx_msg void OnUsePopupHelpChanged();
  73.     //}}AFX_DISPATCH
  74.      DECLARE_DISPATCH_MAP()
  75.  
  76.      afx_msg void AboutBox();
  77.  
  78. // Event maps
  79.      //{{AFX_EVENT(CTesthelpCtrl)
  80.     //}}AFX_EVENT
  81.      DECLARE_EVENT_MAP()
  82.  
  83. // Dispatch and event IDs
  84. public:
  85.      enum {
  86.      //{{AFX_DISP_ID(CTesthelpCtrl)
  87.     dispidName1 = 1L,
  88.     dispidName2 = 2L,
  89.     dispidName3 = 3L,
  90.     dispidUseMyHelp = 4L,
  91.     dispidShowToolTip = 5L,
  92.     dispidToolTipText = 6L,
  93.     dispidUsePopupHelp = 7L,
  94.     //}}AFX_DISP_ID
  95.      };
  96.  
  97.  
  98. };
  99.