#pragma once #include class CPushButton : public CBCGPButton { public: CPushButton() { } virtual ~CPushButton() { } std::function userOnLButtonDown; std::function userOnLButtonUp; protected: afx_msg void OnLButtonDown(UINT nFlags, CPoint point);//按下和弹起事件 afx_msg void OnLButtonUp(UINT nFlags, CPoint point); DECLARE_MESSAGE_MAP() };