www.pudn.com > VQ_Final.rar > MyButton.h
#ifndef MYBUTTON
#define MYBUTTON
//自绘按钮 作者:信息工程学院0213104班 王肇刚
//这个类是我以前写的,这次拿来用了
class CMyButton : public CButton
{
public:
CMyButton();
public:
BOOL m_bHover; //表示鼠标是否停在按钮上
public:
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
virtual void PreSubclassWindow();
public:
virtual ~CMyButton();
protected:
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnMouseLeave(WPARAM w,LPARAM l); //鼠标离开
afx_msg void OnMouseHover(WPARAM w,LPARAM l); //鼠标停留
DECLARE_MESSAGE_MAP()
};
#endif