?? hyperlink.h
字號:
// HyperLink.h : header file
//
//
// HyperLink static control. Will open the default browser with the given URL
// when the user clicks on the link.
//
// Copyright Chris Maunder, 1997, 1998
// Feel free to use and distribute. May not be sold for profit.
#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 // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////////
// CHyperLink window
class CHyperLink : public CStatic
{
// Construction/destruction
public:
CHyperLink();
virtual ~CHyperLink();
// Attributes
public:
// Operations
public:
//設定URL
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(BOOL bUnderline = TRUE);
//獲得是否有下劃線
BOOL GetUnderline() const;
//設定是否是自動改變大小
void SetAutoSize(BOOL bAutoSize = TRUE);
BOOL GetAutoSize() const;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHyperLink)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
protected:
//連接到URL
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; // 是否被訪問
BOOL m_bUnderline; // 是否有下劃線
BOOL m_bAdjustToFit; // 是否自動調整控件大小
CString m_strURL; // URL
CFont m_Font; // 設定字體
HCURSOR m_hLinkCursor; // 光標
CToolTipCtrl m_ToolTip; // 提示文字
// Generated message map functions
protected:
//{{AFX_MSG(CHyperLink)
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
afx_msg void OnClicked();
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HYPERLINK_H__D1625061_574B_11D1_ABBA_00A0243D1382__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -