123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- #if !defined(AFX_HYPERLINK_H__D1625061_574B_11D1_ABBA_00A0243D1382__INCLUDED_)
- #define AFX_HYPERLINK_H__D1625061_574B_11D1_ABBA_00A0243D1382__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif
- class CHyperLink : public CStatic
- {
- public:
- CHyperLink();
- virtual ~CHyperLink();
- public:
- enum UnderLineOptions { ulHover = -1, ulNone = 0, ulAlways = 1};
- public:
- void SetURL(CString strURL);
- CString GetURL() const;
- void SetColours(COLORREF crLinkColour, COLORREF crVisitedColour,
- COLORREF crHoverColour = -1);
- COLORREF GetLinkColour() const;
- COLORREF GetVisitedColour() const;
- COLORREF GetHoverColour() const;
- void SetVisited(BOOL bVisited = TRUE);
- BOOL GetVisited() const;
- void SetLinkCursor(HCURSOR hCursor);
- HCURSOR GetLinkCursor() const;
- void SetUnderline(int nUnderline = ulHover);
- int GetUnderline() const;
- void SetAutoSize(BOOL bAutoSize = TRUE);
- BOOL GetAutoSize() const;
-
-
- public:
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- virtual BOOL DestroyWindow();
- protected:
- virtual void PreSubclassWindow();
-
- protected:
- HINSTANCE GotoURL(LPCTSTR url, int showcmd);
- void ReportError(int nError);
- LONG GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata);
- void PositionWindow();
- void SetDefaultCursor();
- protected:
- COLORREF m_crLinkColour, m_crVisitedColour;
- COLORREF m_crHoverColour;
- BOOL m_bOverControl;
- BOOL m_bVisited;
- int m_nUnderline;
- BOOL m_bAdjustToFit;
- CString m_strURL;
- CFont m_UnderlineFont;
- CFont m_StdFont;
- HCURSOR m_hLinkCursor;
- CToolTipCtrl m_ToolTip;
- UINT m_nTimerID;
-
- protected:
-
- afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
-
- afx_msg void OnClicked();
- DECLARE_MESSAGE_MAP()
- };
- #endif
|