Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlCoolTip.h

Go to the documentation of this file.
00001 //
00002 // CtrlCoolTip.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 
00022 #if !defined(AFX_CTRLCOOLTIP_H__9F287EE6_069E_4FBB_8657_533279376816__INCLUDED_)
00023 #define AFX_CTRLCOOLTIP_H__9F287EE6_069E_4FBB_8657_533279376816__INCLUDED_
00024 
00025 #pragma once
00026 
00027 class CLineGraph;
00028 
00029 
00030 class CCoolTipCtrl : public CWnd
00031 {
00032 // Construction
00033 public:
00034         CCoolTipCtrl();
00035         virtual ~CCoolTipCtrl();
00036 
00037         DECLARE_DYNAMIC(CCoolTipCtrl)
00038 
00039 // Attributes
00040 protected:
00041         BOOL*   m_pbEnable;
00042         LPVOID  m_pContext;
00043         HWND    m_hAltWnd;
00044         BOOL    m_bTimer;
00045         BOOL    m_bVisible;
00046         CPoint  m_pOpen;
00047         DWORD   m_tOpen;
00048         CSize   m_sz;
00049 protected:
00050         static LPCTSTR  m_hClass;
00051 
00052 // Operations
00053 public:
00054         virtual void Show(LPVOID pContext, HWND hAltWnd = NULL);
00055         virtual void Hide();
00056 protected:
00057         virtual void ShowImpl();
00058         void    CalcSizeHelper();
00059         void    AddSize(CDC* pDC, LPCTSTR pszText, int nBase = 0);
00060         void    GetPaintRect(RECT* pRect);
00061         void    DrawText(CDC* pDC, POINT* pPoint, LPCTSTR pszText, int nBase = 0);
00062         void    DrawRule(CDC* pDC, POINT* pPoint, BOOL bPos = FALSE);
00063         BOOL    WindowFromPointBelongsToOwner(const CPoint& point);
00064 protected:
00065         CLineGraph*     CreateLineGraph();
00066 protected:
00067         virtual BOOL OnPrepare();
00068         virtual void OnCalcSize(CDC* pDC);
00069         virtual void OnShow();
00070         virtual void OnHide();
00071         virtual void OnPaint(CDC* pDC);
00072 
00073 // Overrides
00074 public:
00075         //{{AFX_VIRTUAL(CCoolTipCtrl)
00076         virtual BOOL Create(CWnd* pParentWnd, BOOL* pbEnable = NULL);
00077         //}}AFX_VIRTUAL
00078 
00079 // Implementation
00080 protected:
00081         //{{AFX_MSG(CCoolTipCtrl)
00082         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00083         afx_msg void OnDestroy();
00084         afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00085         afx_msg void OnPaint();
00086         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00087         afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00088         afx_msg void OnTimer(UINT nIDEvent);
00089         //}}AFX_MSG
00090 
00091         DECLARE_MESSAGE_MAP()
00092 
00093 };
00094 
00095 //{{AFX_INSERT_LOCATION}}
00096 
00097 #ifndef WS_EX_LAYERED
00098 #define WS_EX_LAYERED           0x80000
00099 #define LWA_ALPHA                       0x02
00100 #endif
00101 
00102 #define TIP_TEXTHEIGHT  14
00103 #define TIP_RULE                11
00104 #define TIP_GAP                 5
00105 
00106 #endif // !defined(AFX_CTRLCOOLTIP_H__9F287EE6_069E_4FBB_8657_533279376816__INCLUDED_)

Generated on Thu Dec 15 10:39:35 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2