Welcome to mirror list, hosted at ThFree Co, Russian Federation.

HyperLink.h « Ext2Mgr - github.com/matt-wu/Ext3Fsd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c56012a66997241dd457f53040a08a0c2bef536 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
////////////////////////////////////////////////////////
// Class Name : CMyHyperLink
// Written By : Renjith.R
// Email : renjith_sree@hotmail.com
// Details :Derived from MFC CStatic
// Date :Nov 25 2002
// This can be used as a Hyperlink
//Feel free to use this class in your project

///////////////////////////////////////////////////////////


#if !defined(AFX_MYHYPERLINK_H__699B2FB4_0C03_4B12_B117_210A97860E0D__INCLUDED_)
#define AFX_MYHYPERLINK_H__699B2FB4_0C03_4B12_B117_210A97860E0D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyHyperLink.h : header file
//

//This is the EventID , Which Will  send to the Parent
//by the hyperlink  control

# define _HYPERLINK_EVENT WM_USER + 101

/////////////////////////////////////////////////////////////////////////////
// CMyHyperLink window

class CMyHyperLink : public CStatic
{
// Construction
public:
    CMyHyperLink();

// Attributes
public:

// Operations
public:

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CMyHyperLink)
public:
    virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
    virtual void PreSubclassWindow();
    virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
    //}}AFX_VIRTUAL

// Implementation
public:
    void SetFireChild(int nFlag);
    CString GetLinkText();
    CString GetLinkUrl();

    bool GoToLinkUrl(CString csLink);

    void SetHoverColor(COLORREF cHoverColor);
    void SetVisitedColor(COLORREF sVisitedColor);
    void SetLinkUrl(CString csUrl);
    void SetToolTipBgColor(COLORREF sToolTipBgColor);
    void SetToolTipTextColor(COLORREF sToolTipText);
    void SetLinkText(CString csLinkText);
    void SetTootTipText(LPCSTR szToolTip);
    void ActiveToolTip(int nFlag);
    void SetLinkColor(COLORREF sLinkColor);

    virtual ~CMyHyperLink();

    // Generated message map functions
protected:
    bool m_bFireChild;

    HCURSOR m_hHyperCursor;

    bool m_bEnableToolTip;
    bool m_bMouseOver;
    bool m_bVisited;

    CFont m_oTextFont;
    CToolTipCtrl m_ToolTip;

    CString m_csToolTipText;
    CString m_csLinkText;
    CString m_csUrl;

    COLORREF m_sHoverColor;
    COLORREF m_sLinkColor;
    COLORREF m_sVisitedColor;

    //{{AFX_MSG(CMyHyperLink)
    afx_msg void OnMouseMove(UINT nFlags, CPoint point);
    afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
    afx_msg void OnClicked();
    afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
    //}}AFX_MSG

    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYHYPERLINK_H__699B2FB4_0C03_4B12_B117_210A97860E0D__INCLUDED_)