Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.2 KiB

  1. // HotLink.h : header file
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. // CHotLink window
  5. class CHotLink : public CButton
  6. {
  7. // Construction
  8. public:
  9. CHotLink();
  10. // Attributes
  11. public:
  12. BOOL m_fBrowse;
  13. BOOL m_fExplore;
  14. BOOL m_fOpen;
  15. // Operations
  16. public:
  17. void Browse();
  18. void Explore();
  19. void Open();
  20. virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
  21. // set the title string
  22. void SetTitle( CString sz );
  23. // Overrides
  24. // ClassWizard generated virtual function overrides
  25. //{{AFX_VIRTUAL(CHotLink)
  26. //}}AFX_VIRTUAL
  27. // Implementation
  28. public:
  29. virtual ~CHotLink();
  30. // Generated message map functions
  31. protected:
  32. //{{AFX_MSG(CHotLink)
  33. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  34. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  35. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  36. //}}AFX_MSG
  37. DECLARE_MESSAGE_MAP()
  38. // height and width of the displayed text
  39. void GetTextRect( CRect &rect );
  40. CSize m_cpTextExtents;
  41. // tracking the mouse flag
  42. BOOL m_CapturedMouse;
  43. // init the font
  44. BOOL m_fInitializedFont;
  45. };
  46. /////////////////////////////////////////////////////////////////////////////