TitleTip.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #if !defined(AFX_TITLETIP_H__FB05F243_E98F_11D0_82A3_20933B000000__INCLUDED_)
  2. #define AFX_TITLETIP_H__FB05F243_E98F_11D0_82A3_20933B000000__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // TitleTip.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CTitleTip window
  10. #define TITLETIP_CLASSNAME _T("ZTitleTip")
  11. /**
  12. * Titletips similar to tooltips. For ListView controls, TitleTips are used to
  13. * display text of those cells which are not wide enough to display the text
  14. * completely. TitleTips show up as soon as the mouse moves over the cell.
  15. */
  16. class CTitleTip : public CWnd
  17. {
  18. // Construction
  19. public:
  20. CTitleTip();
  21. virtual ~CTitleTip();
  22. // Attributes
  23. public:
  24. // Operations
  25. public:
  26. // Overrides
  27. // ClassWizard generated virtual function overrides
  28. //{{AFX_VIRTUAL(CTitleTip)
  29. public:
  30. virtual BOOL PreTranslateMessage(MSG* pMsg);
  31. virtual BOOL Create(CWnd* pParentWnd);
  32. //}}AFX_VIRTUAL
  33. // Implementation
  34. public:
  35. int GetHorzSpace() {return m_iHorzSpace;}
  36. void SetBackground(HBRUSH brshBackground);
  37. void SetBkColor(COLORREF crColor);
  38. void SetTextColor(COLORREF crColor);
  39. void Show(CRect rectTitle, CString sTitleText, int xoffset = 0);
  40. static void RegisterWindowClass();
  41. protected:
  42. CWnd* m_pParentWnd;
  43. CRect m_rectTitle;
  44. HBRUSH m_brshBackground;
  45. COLORREF m_clrBackground;
  46. COLORREF m_clrText;
  47. int m_iHorzSpace;
  48. // Generated message map functions
  49. protected:
  50. //{{AFX_MSG(CTitleTip)
  51. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. };
  55. /////////////////////////////////////////////////////////////////////////////
  56. //{{AFX_INSERT_LOCATION}}
  57. // Microsoft Developer Studio will insert additional declarations
  58. // immediately before the previous line.
  59. #endif // !defined(AFX_TITLETIP_H__FB05F243_E98F_11D0_82A3_20933B000000__INCLUDED_)