a16label.h

来自「自定义控件」· C头文件 代码 · 共 96 行

H
96
字号
#if !defined(AFX_A16Label_H__A4EABEC5_2E8C_11D1_B79F_00805F9ECE10__INCLUDED_)
#define AFX_A16Label_H__A4EABEC5_2E8C_11D1_B79F_00805F9ECE10__INCLUDED_

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

#define	NM_LINKCLICK	WM_APP + 0x200

/////////////////////////////////////////////////////////////////////////////
// CA16Label window

class CA16Label : public CStatic
{
// Construction
public:
	enum FlashType {None, Text, Background };
	enum Type3D { Raised, Sunken};

	CA16Label();
	virtual CA16Label& SetBkColor(COLORREF crBkgnd);
	virtual CA16Label& SetTextColor(COLORREF crText);
	virtual CA16Label& SetText(const CString& strText);
	virtual CA16Label& SetFontBold(BOOL bBold);
	virtual CA16Label& SetFontName(const CString& strFont);
	virtual CA16Label& SetFontUnderline(BOOL bSet);
	virtual CA16Label& SetFontItalic(BOOL bSet);
	virtual CA16Label& SetFontSize(int nSize);
	virtual CA16Label& SetSunken(BOOL bSet);
	virtual CA16Label& SetBorder(BOOL bSet);
	virtual CA16Label& SetTransparent(BOOL bSet);
	virtual CA16Label& FlashText(BOOL bActivate);
	virtual CA16Label& FlashBackground(BOOL bActivate);
	virtual CA16Label& SetLink(BOOL bLink,BOOL bNotifyParent);
	virtual CA16Label& SetLinkCursor(HCURSOR hCursor);
	virtual CA16Label& SetFont3D(BOOL bSet,Type3D type=Raised);
	virtual CA16Label& SetRotationAngle(UINT nAngle,BOOL bRotation);


// Attributes
public:
protected:
	void ReconstructFont();
	COLORREF	m_crText;
	HBRUSH		m_hwndBrush;
	HBRUSH		m_hBackBrush;
	LOGFONT		m_lf;
	CFont		m_font;
	CString		m_strText;
	BOOL		m_bState;
	BOOL		m_bTimer;
	BOOL		m_bLink;
	BOOL		m_bTransparent;
	FlashType	m_Type;
	HCURSOR		m_hCursor;
	Type3D		m_3dType;
	BOOL		m_bFont3d;
	BOOL		m_bToolTips;
	BOOL		m_bNotifyParent;
	BOOL		m_bRotation;

	// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CA16Label)
	public:
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CA16Label();

	// Generated message map functions
protected:
	//{{AFX_MSG(CA16Label)
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnPaint();
	afx_msg void OnSysColorChange();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_A16Label_H__A4EABEC5_2E8C_11D1_B79F_00805F9ECE10__INCLUDED_)

⌨️ 快捷键说明

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