www.pudn.com > WavePlayer_Final.rar > MyButton.h
#if !defined(AFX_MYBUTTON_H__22AEF1CC_C71F_4EA2_93D3_5F19AF14E4E4__INCLUDED_)
#define AFX_MYBUTTON_H__22AEF1CC_C71F_4EA2_93D3_5F19AF14E4E4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyButton.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CMyButton window
//自绘按钮 作者:信息工程学院0213104班 王肇刚
class CMyButton : public CButton
{
// Construction
public:
CMyButton();
// Attributes
public:
BOOL m_bHover; //表示鼠标是否停在按钮上
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
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 BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
afx_msg void OnMouseLeave(WPARAM w,LPARAM l); //鼠标离开
afx_msg void OnMouseHover(WPARAM w,LPARAM l); //鼠标停留
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYBUTTON_H__22AEF1CC_C71F_4EA2_93D3_5F19AF14E4E4__INCLUDED_)