24 lines
419 B
C++
24 lines
419 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
class CPushButton : public CBCGPButton
|
|
{
|
|
public:
|
|
CPushButton()
|
|
{
|
|
|
|
}
|
|
virtual ~CPushButton() {
|
|
|
|
}
|
|
|
|
std::function<void(UINT, CPoint)> userOnLButtonDown;
|
|
std::function<void(UINT, CPoint)> userOnLButtonUp;
|
|
protected:
|
|
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);//按下和弹起事件
|
|
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|