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

📄 pushbutton.h

📁 一个完整的数字硬盘录像机系统软件
💻 H
字号:
#if !defined(AFX_PUSHBUTTON_H__CA835B7D_5E36_4D23_9CA7_C635D238A519__INCLUDED_)
#define AFX_PUSHBUTTON_H__CA835B7D_5E36_4D23_9CA7_C635D238A519__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CPushButton window
class CImageObject;
class CPushButton : public CButton
{
// Construction
public:
	CPushButton();
	enum {ST_ALIGN_HORIZ, ST_ALIGN_VERT};
// Attributes
public:
	HICON          m_hIcon;
    CImageObject * m_pBKObject;
	CString        m_sCaption;
    CToolTipCtrl*  m_pToolTip;
   	CRect          m_rectSearch;
	int            m_nAlign;
	BOOL           m_bDrawBorder;
	BOOL           m_MouseOnButton;
	BOOL           m_bDrawFlatFocus;
	HCURSOR        m_hCursor;
	BYTE           m_cyIcon;
	BYTE           m_cxIcon;
	COLORREF       m_crInactiveBg;
    COLORREF       m_crInactiveFg;
    COLORREF       m_crActiveBg;
    COLORREF       m_crActiveFg;
private:
	void           DrawTheIcon(CDC* pDC,RECT* rcItem, CRect* captionRect, BOOL IsPressed, BOOL IsDisabled);
// Operations
public:
	void           CreateTooltips();
	void           SetIcon(CString sCaption,int nIcon,CString sBKName);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPushButton)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CPushButton();
	BOOL           SetBtnCursor(int nCursorId = -1);
	void           SetDefaultActiveFgColor(BOOL bRepaint = FALSE);
	void           SetActiveFgColor(COLORREF crNew, BOOL bRepaint = FALSE);
	const COLORREF GetActiveFgColor();
	
	void           SetDefaultActiveBgColor(BOOL bRepaint = FALSE);
	void           SetActiveBgColor(COLORREF crNew, BOOL bRepaint = FALSE);
	const COLORREF GetActiveBgColor();
	void           SetDefaultInactiveFgColor(BOOL bRepaint = FALSE);
	void           SetInactiveFgColor(COLORREF crNew, BOOL bRepaint = FALSE);
	const COLORREF GetInactiveFgColor();
	void           SetDefaultInactiveBgColor(BOOL bRepaint = FALSE);
	void           SetInactiveBgColor(COLORREF crNew, BOOL bRepaint = FALSE);
	const COLORREF GetInactiveBgColor();
	void           SetAlign(int nAlign);
	int            GetAlign();
	void           DrawBorder(BOOL bEnable = TRUE);
	// Generated message map functions
protected:
	//{{AFX_MSG(CPushButton)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	//}}AFX_MSG
	afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMH, LRESULT *pResult); 
	DECLARE_MESSAGE_MAP()
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PUSHBUTTON_H__CA835B7D_5E36_4D23_9CA7_C635D238A519__INCLUDED_)

⌨️ 快捷键说明

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