📄 jnlabel.h
字号:
#if !defined(AFX_JNLABEL_H__6B622BA0_3F01_11D4_8226_444553540000__INCLUDED_)
#define AFX_JNLABEL_H__6B622BA0_3F01_11D4_8226_444553540000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// Label.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// JnLabel window
enum FlashType {None, Text, Background };
typedef struct tagJn_Label {
NMHDR hdr;
CWnd* pWnd;
} JN_LABEL;
class JnLabel : public CStatic
{
// Construction
public:
JnLabel();
JnLabel& SetBkColor(COLORREF crBkgnd);
JnLabel& SetTextColor(COLORREF crText);
JnLabel& SetText(const CString& strText);
JnLabel& SetFontBold(BOOL bBold);
JnLabel& SetFontName(const CString& strFont);
JnLabel& SetFontUnderline(BOOL bSet);
JnLabel& SetFontItalic(BOOL bSet);
JnLabel& SetFontSize(int nSize);
JnLabel& SetSunken(BOOL bSet);
JnLabel& SetBorder(BOOL bSet);
JnLabel& FlashText(BOOL bActivate);
JnLabel& FlashBackground(BOOL bActivate);
JnLabel& SetLink(BOOL bLink);
JnLabel& SetLinkCursor(HCURSOR hCursor);
// Attributes
public:
protected:
void ReconstructFont();
COLORREF m_crText;
COLORREF m_BkColor;
HBRUSH m_hBrush;
HBRUSH m_hwndBrush;
LOGFONT m_lf;
CFont m_font;
CString m_strText;
BOOL m_bState;
BOOL m_bTimer;
BOOL m_bLink;
FlashType m_Type;
HCURSOR m_hCursor;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(JnLabel)
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
LRESULT SendMessageToParent(int nRow, int nCol, int nMessage);
COLORREF GetBkColor();
virtual ~JnLabel();
// Generated message map functions
protected:
//{{AFX_MSG(JnLabel)
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
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
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_JNLABEL_H__6B622BA0_3F01_11D4_8226_444553540000__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -