imagetextbutton.h

来自「离线的RSS阅读器」· C头文件 代码 · 共 61 行

H
61
字号
#if !defined(AFX_IMAGETEXTBUTTON_H__A457F4BE_C6C0_4CFA_AED2_35B2381C36EF__INCLUDED_)
#define AFX_IMAGETEXTBUTTON_H__A457F4BE_C6C0_4CFA_AED2_35B2381C36EF__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CImageTextButton window

class CImageTextButton : public CButton
{
// Construction
public:
	CImageTextButton();
	CImageTextButton(LPTSTR imagePath,LPTSTR buttonText,CSize imageSize = CSize(16,16),COLORREF rgbin = RGB(184,191,211),COLORREF rgbnot = RGB(222,222,222),COLORREF rgbClick = RGB(131,144,179));

// Attributes
public:
	BOOL OnEraseBkgnd(CDC* pDC);
	LPARAM OnMouseLeave(WPARAM wp, LPARAM lp);
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CImageTextButton)
	public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CImageTextButton();

	// Generated message map functions
protected:
	//{{AFX_MSG(CImageTextButton)
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	CBitmap bmp;
	LPTSTR text;
	BOOL m_mousein;
	BOOL m_click;
	COLORREF m_rgb_in,m_rgb_not,m_rgb_click;
	CSize m_imageSize;
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_IMAGETEXTBUTTON_H__A457F4BE_C6C0_4CFA_AED2_35B2381C36EF__INCLUDED_)

⌨️ 快捷键说明

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