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

📄 mybutton.h

📁 其他人不需帐号就可自由下载此源码 实现了一个类似金山杀毒软件的界面
💻 H
字号:
#if !defined(AFX_MYBUTTON_H__1B425AEB_661D_426C_998C_37C85EF445D5__INCLUDED_)
#define AFX_MYBUTTON_H__1B425AEB_661D_426C_998C_37C85EF445D5__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CMyButton window

class CMyButton : public CButton
{
// Construction
public:
	CMyButton();


public:

	void SetSize(int nWidth, int nHeight);
	void SetBitmaps(UINT nNormal, UINT nSelect, UINT nFocuse);
	void DrawNormalState(CRect rc, CDC *pDC);
	void DrawSelectedState(CRect rc, CDC *pDC);
	void DrawFocusState(CRect rc, CDC *pDC);
	void DrawFace(CRect& rc, COLORREF clrTopRight, COLORREF clrBottomLeft,
			CDC* pDC);
	void DrawFrame(CRect& rc, COLORREF clrTopRight, COLORREF clrBottomLeft,
			CDC *pDC);
	
public:

	BOOL	m_bIsMouseMove;
	CBitmap m_bmNormal;
	CBitmap m_bmSelect;
	CBitmap m_bmFocuse;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyButton)
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMyButton();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyButton)
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnClicked();
	//}}AFX_MSG
	afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_MYBUTTON_H__1B425AEB_661D_426C_998C_37C85EF445D5__INCLUDED_)

⌨️ 快捷键说明

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