00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #if !defined(AFX_TITLETIP_H__C7165DA1_187F_11D1_992F_895E185F9C72__INCLUDED_)
00026 #define AFX_TITLETIP_H__C7165DA1_187F_11D1_992F_895E185F9C72__INCLUDED_
00027
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031
00032 #define TITLETIP_CLASSNAME _T("ZTitleTip")
00033
00035
00036
00037 class CTitleTip : public CWnd
00038 {
00039
00040 public:
00041 CTitleTip();
00042 virtual ~CTitleTip();
00043 virtual BOOL Create( CWnd *pParentWnd);
00044
00045
00046 public:
00047 void SetParentWnd(CWnd* pParentWnd) { m_pParentWnd = pParentWnd; }
00048 CWnd* GetParentWnd() { return m_pParentWnd; }
00049
00050
00051 public:
00052 void Show(CRect rectTitle, LPCTSTR lpszTitleText,
00053 int xoffset = 0, LPRECT lpHoverRect = NULL,
00054 const LOGFONT* lpLogFont = NULL,
00055 COLORREF crTextClr = CLR_DEFAULT, COLORREF crBackClr = CLR_DEFAULT);
00056 void Hide();
00057
00058
00059
00060
00061 public:
00062 virtual BOOL PreTranslateMessage(MSG* pMsg);
00063 virtual BOOL DestroyWindow();
00064
00065
00066
00067 protected:
00068 CWnd *m_pParentWnd;
00069 CRect m_rectTitle;
00070 CRect m_rectHover;
00071 DWORD m_dwLastLButtonDown;
00072 DWORD m_dwDblClickMsecs;
00073 BOOL m_bCreated;
00074
00075
00076 protected:
00077
00078 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00079
00080 DECLARE_MESSAGE_MAP()
00081 };
00082
00084
00085
00086
00087 #endif // !defined(AFX_TITLETIP_H__C7165DA1_187F_11D1_992F_895E185F9C72__INCLUDED_)