⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linkctrl.h

📁 基于winsock的聊天程序
💻 H
字号:
#ifndef __LINKCTRL_H__
#define __LINKCTRL_H__
/////////////////////////// Classes /////////////////////////////////

class CLinkCtrl : public CStatic
{
public:
	//Constructors / Destructors
	CLinkCtrl();
	virtual ~CLinkCtrl();
	//Set or get the link string to use
	void SetLinkString(const CString& sLinkString);
	CString GetLinkString() const { return m_sLinkString; };
    //Set or get the link string description (really just the static's window text)
    void SetLinkStringDescription(const CString& sDescription);
    CString GetLinkStringDescription() const;
	//Set or get the hyperlink color 
	void SetLinkColor(const COLORREF& color);
	COLORREF GetLinkColor() { return m_Color; };
	//Set or get the hyperlink color for visited links
	void SetVisitedLinkColor(const COLORREF& color);
	COLORREF GetVisitedLinkColor() { return m_VisitedColor; };
	//Set or get the hyperlink color for highlighted links
	void SetPointLinkColor(const COLORREF& color);
	COLORREF GetPointLinkColor() { return m_PointColor; };
    //Connects to the URL
    BOOL Open() const;
protected:
  enum State
  {
    SL_NOT_VISITED,
    SL_VISITED,
    SL_POINT
  };
	//{{AFX_MSG(CLinkCtrl)
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	//}}AFX_MSG
	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
	void HighLight(BOOL state);
	CString  m_sLinkDescription;
	CString  m_sLinkString;
	HCURSOR  m_hLinkCursor;
    HCURSOR  m_hArrowCursor;
	COLORREF m_Color;
	COLORREF m_VisitedColor;
    COLORREF m_PointColor;
    State    m_State;
    State    m_OldState;
    CFont   m_font;
	DECLARE_MESSAGE_MAP()
};

#endif //__LINKCTRL_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -