00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLMATCHTIP_H__7464D5F3_15C5_4D17_BCCC_DC8B3728565B__INCLUDED_)
00023 #define AFX_CTRLMATCHTIP_H__7464D5F3_15C5_4D17_BCCC_DC8B3728565B__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "MetaList.h"
00028
00029 class CMatchFile;
00030 class CQueryHit;
00031 class CSchema;
00032
00033
00034 class CMatchTipCtrl : public CWnd
00035 {
00036
00037 public:
00038 CMatchTipCtrl();
00039 virtual ~CMatchTipCtrl();
00040
00041
00042 protected:
00043 CWnd* m_pOwner;
00044 BOOL m_bVisible;
00045 CMatchFile* m_pFile;
00046 CQueryHit* m_pHit;
00047 CPoint m_pOpen;
00048 DWORD m_tOpen;
00049 protected:
00050 CString m_sName;
00051 CString m_sUser;
00052 CString m_sSHA1;
00053 CString m_sTiger;
00054 CString m_sED2K;
00055 CString m_sType;
00056 CString m_sSize;
00057 CString m_sBusy;
00058 CString m_sPush;
00059 CString m_sUnstable;
00060 int m_nIcon;
00061 CString m_sStatus;
00062 COLORREF m_crStatus;
00063 CString m_sPartial;
00064 CString m_sQueue;
00065 CSchema* m_pSchema;
00066 CMetaList m_pMetadata;
00067 int m_nKeyWidth;
00068 int m_nRating;
00069 protected:
00070 HINSTANCE m_hUser32;
00071 BOOL (WINAPI *m_pfnSetLayeredWindowAttributes)(HWND, COLORREF, BYTE, DWORD);
00072 protected:
00073 static LPCTSTR m_hClass;
00074 static CBrush m_brBack;
00075 static COLORREF m_crBack;
00076 static COLORREF m_crText;
00077 static COLORREF m_crBorder;
00078 static COLORREF m_crWarnings;
00079
00080
00081 public:
00082 void Show(CMatchFile* pFile, CQueryHit* pHit);
00083 void Hide();
00084 protected:
00085 void ShowInternal();
00086 void LoadFromFile();
00087 void LoadFromHit();
00088 BOOL LoadTypeInfo();
00089 CSize ComputeSize();
00090 void ExpandSize(CDC& dc, CSize& sz, LPCTSTR pszText, int nBase = 0);
00091 void DrawText(CDC& dc, CPoint& pt, LPCTSTR pszText);
00092
00093
00094 public:
00095
00096 public:
00097 virtual BOOL Create(CWnd* pParentWnd);
00098
00099
00100
00101 protected:
00102
00103 afx_msg void OnTimer(UINT nIDEvent);
00104 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00105 afx_msg void OnPaint();
00106 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00107 afx_msg void OnDestroy();
00108 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00109 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00110
00111 DECLARE_MESSAGE_MAP()
00112 };
00113
00114
00115
00116
00117 #define IDC_MATCH_TIP 111
00118
00119 #endif // !defined(AFX_CTRLMATCHTIP_H__7464D5F3_15C5_4D17_BCCC_DC8B3728565B__INCLUDED_)