?? superlink.h
字號:
#if !defined(AFX_SUPERLINK_H__CC999102_121F_11D5_9F99_5254ABDD22CE__INCLUDED_)
#define AFX_SUPERLINK_H__CC999102_121F_11D5_9F99_5254ABDD22CE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/*
* Use: int function OnInitDialog() add:
* CSuper m_test; (in *.h file)
*
* m_test.SubclassDlgItem(IDC_TEST_LINK,this);
* m_test.SetSuperLink(TRUE);
* m_test.SetLinkCursor(AfxGetApp()->LoadCursor(IDC_CURSOR_HAND));
* m_test.SetLinkAddress("http://www.china.com/");
*
*/
// SuperLink.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CSuperLink window
class CSuperLink : public CStatic
{
// Construction
public:
CSuperLink();
CSuperLink(COLORREF crClicked, COLORREF crMoveOn, COLORREF crOordinary);
// Attributes
public:
COLORREF m_crText;
BOOL SetLinkAddress(CString strLink);
void MouseLeave(void);
void MouseEnter(void);
void SetLinkCursor(HCURSOR hCursor);
void SetSuperLink(BOOL setlink);
protected:
CString m_linktext; // shell 調用的聯接參數
BOOL m_bClicked; // 鼠標是否單擊超聯接
HCURSOR m_hCursor; // 鼠標移動到超聯接上時的鼠標形狀
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSuperLink)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSuperLink();
// Generated message map functions
protected:
//{{AFX_MSG(CSuperLink)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
BOOL m_bcaptured; //捕捉鼠標移動
COLORREF m_crClicked; //單擊超聯接后文本的顏色
COLORREF m_crMoveOn; //鼠標移動到超聯接時的文本的顏色
COLORREF m_crOrdinary ; //未激活超聯接時文本的顏色
LOGFONT m_lf;
CFont m_font; //超聯接上的文本的字體
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SUPERLINK_H__CC999102_121F_11D5_9F99_5254ABDD22CE__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -